BookmarkSubscribeRSS Feed
ys562
Calcite | Level 5

Hi all,

 

I found a paper which includes the code for a two part model to calculate the healthcare expenditure. There are some parts of the code that I don't understand. During the post-processing after PROC MIXED, it used x3 x4 x6 to calculate logsigmasq, saying that they are x3 x4 x6 are covariates for variance. What does it mean? Where can I get my x3 x4 x6? Thanks

 

See below:

proc transpose data=esttheta out=esttheta;
var estimate;
id covparm;
run;
data esttheta;
set esttheta;
exp_intercept=log(residual);
run;
data out2;
if _n_ =1 then set esttheta;
set out1;
logsigmasq=exp_intercept+exp_x3*x3+ exp_x4*x4 +exp_x6*x6;
/* x3 x4 x6 are covariates for variance */
sigmasqcompute=exp(logsigmasq);
/* use below to check that you calculated sigmasqcompute correctly,
It gives you sigma for the positive values used in estimation*/
sigmahat=resid/pearsonresid;
sigmasq=sigmahat**2;/*this should agree with sigmasqcompute */
predposcost=exp(pred+0.5*sigmasqcompute);
run;

1 REPLY 1
Reeza
Super User
If you look at the previous steps, x3, x4, x5, x6 are in the model so they're a variable included in the original data set. Since we don't have the original data we cannot really answer that question. Have you contacted the author?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 569 views
  • 0 likes
  • 2 in conversation