- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
On this instructional document about PROC MIXED:
https://www.pharmasug.org/proceedings/2021/SA/PharmaSUG-2021-SA-062.pdf
They demonstrate the example below to create an output that shows Least Square Means and columns for Estimate, Standard Error, DF, Lower and Upper. I need all of those, but I also want the N statistic. Does anyone know if there is an option that can be added in so I can get N on this output please? Thanks.
ods output lsmeans=pb_lsmean diffs=pb_lsdiff; proc mixed data=qlqc2 method=reml covtest empirical; by param; class subjid trt visit; model chg=base trt visit trt*visit; random intercept/ subject=subjid; repeated visit/ subject=subjid type=ar(1); lsmeans trt*visit/ cl pdiff; run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You are going to have to merge the PROC MEANS output with the PROC MIXED output. PROC SQL is probably the best tool for that.
SteveDenham
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Consider displaying Univariate(PROC MEANS) and MIXED statistics in rows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure what you mean by this. Industry convention requires statistics to be shown in tables where each statistic has a vertical column that displays the results and the treatments are listed horizontally in the table. If I displayed it vertically, no one would be able to read it or use in their reports.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add the NObs table to your ODS OUTPUT statement:
ods output lsmeans=pb_lsmean diffs=pb_lsdiff nobs=pb_nobs;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The Proc Means procedure shows N, so currently I'm creating a Proc Mixed followed by Proc Means to generate all of the statistics I need. But I wanted to create a nice, tidy table that shows them all together that I can easily copy and paste onto an MS Word document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You are going to have to merge the PROC MEANS output with the PROC MIXED output. PROC SQL is probably the best tool for that.
SteveDenham