BookmarkSubscribeRSS Feed
☑ This topic is solved. 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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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