BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RAVI2000
Lapis Lazuli | Level 10

Hello everyone,

 

I have the below output. I would also want to have N values for these. How can we produce them for all 6 rows?

 

ods output Diffs = AP_3way_diffs(keep = parent _parent _q3 q3 estimate stderr adjustment adjp rename=(adjp=pval));
proc mixed data=fixptsex;
	class parent Q3;
	model maleprod_n = parent Q3  parent*Q3;
	lsmeans parent*Q3 / diff adjust=tukey;
run;

My output from this was as below:

RAVI2000_0-1650573494038.png

I would also like to have individual N values for each row.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Not counting the cell where Q3 is missing ... you have four different combinations, and those are the N values.

 

The PROC MIXED output gives the differences between the LSMEANS, that is 6 differences (Four things taken two at a time is 4*3/2 = 6). There isn't really an N for the differences of LSMEANS in this case, but since you have the PROC FREQ output, you can indicate somehow how many data points are in each combination of the original variables.

--
Paige Miller

View solution in original post

3 REPLIES 3
sbxkoenk
SAS Super FREQ

You want this ??

proc FREQ data=fixptsex;
	tables parent * Q3 / missing list;
run;
/* end of program */

Koen

RAVI2000
Lapis Lazuli | Level 10

This is the freq by q3 and parent.
It is not including maleprod or cross tabluation by q3*parent q3*parent. How would I also include but just get 6 obs.

 

I tried the code you provided. It's giving me as below:

RAVI2000_0-1650575430400.png

 

PaigeMiller
Diamond | Level 26

Not counting the cell where Q3 is missing ... you have four different combinations, and those are the N values.

 

The PROC MIXED output gives the differences between the LSMEANS, that is 6 differences (Four things taken two at a time is 4*3/2 = 6). There isn't really an N for the differences of LSMEANS in this case, but since you have the PROC FREQ output, you can indicate somehow how many data points are in each combination of the original variables.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 641 views
  • 1 like
  • 3 in conversation