{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Handout13 - Lecture 13 1 ODS select and ODS output 2...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 13 1. ODS select and ODS output 2. Back-transformations in SAS 3. Confounding 4. Mediation 5. Segmented regression (broken-stick models) 1 Presenting SAS output Basic: 1. Save output window as file and open this file with MSWord; or copy all and paste into MSWord. 2. In MSWord, select all and change font to Consolas 10pt (or 9pt). 3. Run MSWord macro to fix special characters in tables and printer plots. Often needs much editing: eliminate extra stuff, add comments, etc. 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8th grade math scores example: make table comparing small, medium, large districts. Number of Students in District < 500 500 ° 1500 > 1500 P -value Number ( n ) Math Score % LEP % Free Lunch % Special Ed % Mobility % Drop-out 8th grader students 3 Proc GLM data=B; class district_category; model mathscore log_lep log_lunch Special_Ed_pct log_mobility = district_category; LSmeans district_category/ stderr pdiff CL ; • multiple response variables with same model • get SEs for variables on original scale, 95% CI for those on log scale pdiff p -values apply to back-transformed and original comparisons 4
Background image of page 2
Output: 8 pages of ANOVA tables (need only F -test result for p -value) 10 pages of LSmeans and pdiff Alternative to editing or deleting parts in MSWord: ODS SELECT which parts of output are produced Need SAS Tablenames —names SAS uses for each part of output, given in Details section of SAS Help for each procedure. 5 6
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Need to look farther down in this list: none of these are LSmeans, SEs, 95% CIs 7 8
Background image of page 4
Proc GLM data=B; class district_category; model mathscore log_lep log_lunch Special_Ed_pct log_mobility drop_out_pct log_8th_grade operating_budget = district_category; lsmeans district_category/ stderr pdiff CL; ODS select LSMeans Diff LSMeanCL; Only tablenames in ODS Select list are output. Tablenames for LSmeans, SEs, pdiff output, 95% CIs Omits 8 pages of ANOVA tables, lists of factor levels, etc. 9 Backtransforming Results in SAS SAS can only work on variables in a dataset. Need to get LSmeans and 95% CIs in a dataset to backtransform. Proc GLM data=B; class district_category; model mathscore log_lep log_lunch Special_Ed_pct log_mobility drop_out_pct log_8th_grade operating_budget = district_category; lsmeans district_category/ stderr pdiff CL; ODS select LSMeans Diff; ODS output LSMeanCL = logCI; ODS output Tablename = dataset-name; 10
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
First step: identify variable names in output dataset: Proc Print data = logCI (obs=6); Miss district_ Obs Pattern Effect Dependent category 1 1 district_category mathscore large (>1500) 2 1 district_category mathscore med (500-1500) 3 1 district_category mathscore small (<500) 4 1 district_category log_lep large (>1500) 5 1 district_category log_lep med (500-1500) 6 1
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}