OPTIONS LINESIZE=88 PAGESIZE=53 NOCENTER NODATE NONUMBER NOFMTERR; *************************************************************************; * PROJECT NAME: Selecting Samples without Replacement in SAS ; * PROGRAM NAME DATE PROGRAMMER ; TITLE1 "Source:lec25p10.sas C:\ed\web\be691f\webready 12/3/98 EJS " ; * Description:Examine Childrens Anaconda Population Data ; * Read in data, select a subset of variables, and display sample ; * records and frequency distribution for two variables ; * ; * Input: anc2v1.sd2 on ANC #1 Data ; * Output: ANC2V1.ssd on 691f #1 ; * Population data for children from Anaconda, Montana with ; * a subset of the variables ; *************************************************************************; LIBNAME new "c:\temp";  **********************************************; *** Read in Data on Population from Anaconda, ; *** Montana, and select variables of interest ; **********************************************; DATA anc2v1; SET new.anc2v1; PROC SORT; BY stratum area aid1 aid2; ***************************************************; *** List some data for five subjects as an example ; *** and examine frequency of childrens age in yrs ; ***************************************************; /* PROC PRINT SPLIT="*" DATA=anc2v1 (OBS=5); ID stratum area; BY stratum area; VAR aid1 aid2 h_type zip c_date c_datev1; TITLE2 "Table 10.1 Housing List of Variable for Children in Anaconda, Montana"; PROC PRINT SPLIT="*" DATA=anc2v1 (OBS=5); ID stratum area; BY stratum area; VAR aid1 aid2 age ageyr famx kidx ; TITLE2 "Table 2. Description of Childrens characteristics for Children in Anaconda, Montana"; PROC FREQ; TABLES stratum ageyr stratum*ageyr/MISSPRINT NOROW NOCOL NOCUM NOPERCENT; TITLE2 "Table 3. Frequency of Stratum and Children's age"; */ ***********************************************; *** Summarize frequency of subjects by stratum ; ***********************************************; PROC FREQ DATA=anc2v2; WHERE ageyr NE .; TABLES stratum; TITLE2 "Table 4. Families by Stratum with at least one child of known age"; RUN;