BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have been using PROC MIXED to analyze data with the following structure:

There are N individuals. Each individual is a member of a single population (P). Each population is a member of a single superpopulation (S). So there is nesting.

The individuals are random members of the population. The populations and superpopulations are specifically chosen. Two individuals can be measured using the same assay.

I use the following code to estimate parameters in the model:

proc mixed ic ratio cl data=work.data nobound;
class super pop indiv assay;
model measurement = super pop(super) / ddfm=kr outp=resids;
random indiv / subject = pop solution;
random assay ;
lsmeans super / diff;
lsmeans pop(super) / diff;
run;

This assumes a within population/between individual variance that is the same between populations.

The 'solution' statement on the random statement gives me what I think are predicted deviations of the individuals from their population mean. I would like to be able to estimate differences between individuals both within and between populations and test to see whether they are signficant or not.

To do this, I added contrast statements :

For individuals in the same population:
contrast 'FP10-FP11 nar' | indiv 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;

This seems to work in that it gives me a result.

If I look at individuals in different populations but the same superpopulation:
contrast 'FP10-G112 nar' pop(super) 1 -1 0 0 0 |
indiv 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;

This has strange behavior. The estimated difference FP10-G112 is the same as the estimated difference between FP10-G120 (same populations) but different from FP12-G112. So there is a weird asymmetry. And besides, they shouldn't give the same result.

If I look at individuals in different superpopulations (and therefore in different populations too):
contrast 'FP11-K121 nar'
super -1 1
pop(super) 1 0 -1 0 0 |
indiv 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 ;

This never returns a result.

If I just estimate the BLUPs (by just putting a single 1 for the appropriate super, pop, and indiv) it doesn't give me the same thing as if I add up the estimates from the solution statements for the appropriate effects.

So my question:

Am I using the contrast statement incorrectly? It looks like the levels within an effect are in alphabetical order. I get the same result described above if I use the 'estimate' statement.

Is there an alternative way to do this? The main problem is getting the appropriate degrees of freedom and standard deviation for the t-test. Can I somehow do this using other output?

Any help would be much appreciated.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
This is not a question related to ODS or the Base SAS Reporting procedures (PRINT, REPORT, TABULATE).

Your best source of help for this question is SAS Technical Support. To send a question to Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 1529 views
  • 0 likes
  • 2 in conversation