Discussion: View Thread

  • 1.  Estimate statement in Proc Mixed

    Posted 04-01-2014 11:29
    Hello all,
    We are doing analyses in Proc Mixed and are getting results that do not make sense.  We are hoping someone here can help resolve the problem.  We are doing an analysis that has random intercepts for each of N subjects with a quadratic model for the relationship between the outcome, Y and time, t.  The time t has been standardized prior to creating a t^2 variable.  In addition, there are two covariates, x1, and x2, that interact.  The interaction between t_std and x1 is also included.  

    We are using the estimate statement to visualize the differences and estimate means for different values of the covariates.  The problem is that the estimates that are produced from the estimate statement do NOT match what one would expect based on the estimates from the model fit (i.e., model .../solution).  In an effort to troubleshoot, we used estimate statements for only the fixed effects, and these estimates are NOT the same as the estimates from the model fit.  The code is shown below.  Can anyone explain why these estimates are not the same?

    Thank you for any help,
    Robert Podolsky

    proc mixed covtest ;
     class x1(ref="0") subid;
     model Y=t_std tstd_squared x1 t_std*preterm
                   x2 x2*x1/solution;
     random int/type=un sub=subid;
     estimate 'intercept' intercept 1;
     estimate 't_std' t_std 1;
     estimate 'tstd_squared' tstd_squared 1;
     estimate 'x2' x2 1;
    run;



    -------------------------------------------
    Robert Podolsky
    Associate Professor
    Wayne State University
    -------------------------------------------


  • 2.  RE:Estimate statement in Proc Mixed

    Posted 04-01-2014 11:53
    Robert, SAS has an option on the estimate that may be useful for checking your estimate statement.

    estimate ..... / e ;

    and it prints what SAS calls the "L" matrix.




    -------------------------------------------
    Chris Barker, Ph.D.
    Consultant and
    Adjunct Associate Professor of Biostatistics
    www,barkerstats.com

    ---
    "In composition you have all the time you want to decide what to say in 15 seconds, in improvisation you have 15 seconds."
    -Steve Lacy
    -------------------------------------------








  • 3.  RE:Estimate statement in Proc Mixed

    Posted 04-01-2014 11:59
    I haven't looked that closely, so this 'guidance' is likely faulty in some respects, but I hope is helpful:

    1) Could you clarify why there is the term "t_std*preterm" in the model, and why you would have an conditional effect in the model but not its corresponding unconditional effect (i.e., why is the  preterm  effect not in the model)?

    2) I believe when you use ESTIMATE, you are estimating the effect of interest with the covariates (e.g., x1, x2) set to zero (rather than to their means), since you do not include them in the ESTIMATE statement.  That may be the source of your problem?

    Kevin

    -------------------------------------------
    Kevin O'Grady
    Affiliate Faculty
    University of Maryland
    -------------------------------------------








  • 4.  RE:Estimate statement in Proc Mixed

    Posted 04-01-2014 14:11
    Thank you to those who responded, and sorry for the bad editing in the first post.  Variable x1 was preterm.  I had edited the code to make the problem more general, but missed the one instance.  As for the actual problem, the /e helped clarify that variable x1/preterm was being included with 0.5.  I had thought that SAS only did this for LSmeans statements, and I could not find SAS documentation indicating that this was done for the estimate statement.  

    -------------------------------------------
    Robert Podolsky
    Associate Professor
    Wayne State University
    -------------------------------------------








  • 5.  RE:Estimate statement in Proc Mixed

    Posted 04-01-2014 15:31
    Robert:

    It would be helpful if you would 1) check the model statement to ensure that it is accurate
    2) post results of the solution and estimate statements so that we could check them.

    -------------------------------------------
    Paul Thompson
    Director, Methodology and Data Analysis Center
    Sanford Research/USD
    -------------------------------------------








  • 6.  RE:Estimate statement in Proc Mixed

    Posted 04-01-2014 12:20
    For your estimate of t_std, what happens if you write the estimate statement as follows?

    estimate 't_std' t_std 1 t_std*preterm 0;

    -------------------------------------------
    Eric Siegel
    Biostatistician
    Univ of Arkansas for Medical Sciences of Biostatistics
    -------------------------------------------