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?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 668 views
  • 0 likes
  • 2 in conversation