LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 22 Jun 2009 09:27:36 -0500
Reply-To:     Robin R High <rhigh@UNMC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin R High <rhigh@UNMC.EDU>
Subject:      Re: "Non-est" issue in the Proc Mixed Procedure
Comments: To: Stanley Wei <medpower@GMAIL.COM>
In-Reply-To:  <722f50c2-6678-4b2d-a8ab-52042ffa6e20@w9g2000pro.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"

Stanley,

I usually find the most helpful way to write ESTIMATE statements, is to first note the order of the variables on the class statement and the number of levels for each,

CLASS subjid time paramn trt;

to write out a path with all combinations:

/* time 0 1 2 3 4 5 paramn 1 2 1 2 1 2 1 2 1 2 1 2 trt 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 */

< note that the order on the CLASS statement is crucial to the next steps; different orders produce different coefficients >

It is then rather straightforward to construct the estimates from these placeholders:

ESTIMATE 'trt=1 at week3, paramn=100' intercept 1 paramn 1 0 time 0 0 0 1 0 0 trt 1 0 time*trt 0 0 0 0 0 0 1 0 0 0 0 0 time*paramn 0 0 0 0 0 0 1 0 0 0 0 0 trt*paramn 1 0 0 0 time*trt*paramn 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 ;

ESTIMATE 'trt=2 at week3, paramn=100' intercept 1 paramn 1 0 time 0 0 0 1 0 0 trt 0 1 time*trt 0 0 0 0 0 0 0 1 0 0 0 0 time*paramn 0 0 0 0 0 0 1 0 0 0 0 0 trt*paramn 0 1 0 0 time*trt*paramn 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 ;

and subtract the two statements to find the contrast "estimate" of interest:

ESTIMATE 'trt=1 vs trt=2 at week3, paramn=100' trt 1 -1 time*trt 0 0 0 0 0 0 1 -1 0 0 0 0 trt*paramn 1 -1 0 0 time*trt*paramn 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 /cl ; run;

Robin High UNMC

Stanley Wei <medpower@GMAIL.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 06/22/2009 04:05 AM Please respond to Stanley Wei <medpower@GMAIL.COM>

To SAS-L@LISTSERV.UGA.EDU cc

Subject "Non-est" issue in the Proc Mixed Procedure

Dear Friends,

We encountered a problem when we tried to get the estimates with the estimate statement in the PROC MIXED procedure, SAS always indicated "Non-est" in the output window and we still do not figure out what's the reason.

Sample data:

SUBJID TRT TIME PARAMN AVAL

329 1 0 250 9.200 329 1 1 250 9.815 329 1 2 250 9.800 329 1 3 250 10.000 329 1 4 250 9.900 329 1 5 250 9.900 332 2 0 100 228.000 332 2 1 100 244.000 332 2 2 100 231.000 332 2 3 100 202.000 332 2 4 100 181.000 332 2 5 100 181.000 332 2 0 250 7.800 332 2 1 250 8.416 332 2 2 250 7.500 332 2 3 250 7.300 332 2 4 250 6.900 332 2 5 250 6.900 369 2 0 100 154.000 369 2 1 100 174.000 369 2 2 100 127.000 369 2 3 100 137.000 369 2 4 100 148.000 369 2 5 100 170.000 369 2 0 250 8.800 369 2 1 250 7.772 369 2 2 250 7.700 369 2 3 250 7.200 369 2 4 250 7.400 369 2 5 250 7.800 373 1 0 100 270.000 373 1 1 100 235.000 373 1 2 100 261.000 373 1 3 100 232.000 373 1 4 100 173.000 373 1 5 100 160.000 ... ...

Time variable has 6 levels, week 0, 1, 2, 3, 4, 5 Paramn has 2 levels 100, 250, indicate two different parameters Trt has 2 levels treatment 1 and treatment 2

PROC MIXED DATA=test order=internal; CLASS subjid time paramn trt; MODEL aval = trt paramn time time*trt time*paramn trt*paramn time*trt*paramn; REPEATED paramn*time / SUBJECT=subjid TYPE=un; ESTIMATE 'trt1 vs trt2 at week3 on A1C'paramn 1 0 time 0 1 0 0 0 0 trt 1 -1 time*trt 0 0 1 -1 0 0 0 0 0 0 0 0 time*paramn 0 0 1 0 0 0 0 0 0 0 0 0 intercept 1 trt*paramn 1 0 -1 0 time*trt*paramn 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0/cl;

ESTIMATE 'trt1 vs trt2 at week6 on A1C' trt 1 -1 paramn 1 0 time 0 0 1 0 0 0 time*trt 0 0 0 0 1 -1 0 0 0 0 0 0 time*paramn 0 0 0 0 1 0 0 0 0 0 0 0 intercept 1 trt*paramn 1 0 -1 0 time*trt*paramn 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 / cl;

ESTIMATE 'trt1 vs trt2 at week12 on A1C' trt 1 -1 paramn 1 0 time 0 0 0 1 0 0 time*trt 0 0 0 0 0 0 1 -1 0 0 0 0 time*paramn 0 0 0 0 0 0 1 0 0 0 0 0 intercept 1 trt*paramn 1 0 -1 0 time*trt*paramn 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 / cl; ESTIMATE 'trt1 vs trt2 at week18 on A1C' trt 1 -1 paramn 1 0 time 0 0 0 0 1 0 time*trt 0 0 0 0 0 0 0 0 1 -1 0 0 time*paramn 0 0 0 0 0 0 0 0 1 0 0 0 intercept 1 trt*paramn 1 0 -1 0 time*trt*paramn 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 /cl; ESTIMATE 'trt1 vs trt2 at week24 on A1C' trt 1 -1 paramn 1 0 time 0 0 0 0 0 1 time*trt 0 0 0 0 0 0 0 0 0 0 1 -1 time*paramn 0 0 0 0 0 0 0 0 0 0 1 0 intercept 1 trt*paramn 1 0 -1 0 time*trt*paramn 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 /cl; ODS OUTPUT Estimates=outm1 covparms=rmse; RUN;

Does anybody know what's the reason of "Non-est" issue with the codes above? Is that caused by the data issues or some additional options to be used or something else wrong with the codes?

Many thanks in advance for your help!

Stanley


Back to: Top of message | Previous page | Main SAS-L page