Thursday, September 30, 2010

Low Rank Radial Smoothing using GLIMMIX and its Scoring

Low Rank Radial Smoothing using GLIMMIX [1], a semiparametric approach to smooth curves [2]. Specifying TYPE=RSMOOTH option in RANDOM statement, we can implement this spline smooth approach. The best thing is that for future scoring, data preparation is extremely easy by using the OUTDESIGN= & NOFIT options in v9.2 PROC GLIMMIX, then use PROC SCORE twice on this design matrix to score the fixed effects design matrix X and the random effects design matrix Z, respective, add up together is the score from this radial smoothing method.

[Coming soon]




proc glimmix data=train_data  absconv=0.005;
     model y = &covars /s;
     random &z /s type=rsmooth  knotmethod=equal(20);
run;

proc glimmix data=test  nofit  outdesign=test2;
     model y=&covars /s;
     random &z /s type=rsmooth knotmethod=equal(20);
run;


proc score data=test2  score=beta_fix  type=parms  out=score_fix;
     var  &covars;
run;

proc score data=test2 score=beta_random type=parms  out=score_random;
     var _z:;
run;




Reference:

1. SAS Institute, Statistical Analysis with the GLIMMIX procedure Course Notes, SAS Press, SAS Institute
2. D Rupper, M.P. Wand, R.J. Carroll, Semiparametric Regression, Cambridge University Press, Cambridge, 2003

 Semiparametric Regression (Cambridge Series in Statistical and Probabilistic Mathematics)

5 comments:

James said...

How are beta_fixed and beta_random obtained? I get that they are the parameter estimates, but it seems they need to be in a special format. Any suggestions?

Liang Xie said...

estimates of fixed effects can be obtained via ODS OUTPUT ParameterEstimates= ;
Empirical Bayesian Prediction can be obtained via ODS OUTPUT SolutionR= ;

You need to transpose both data sets on VAR estimate;

James said...

Great technique & thanks for the post! Applied to model averaged parameter estimates after transposing and it worked great.

James said...

Are you aware of documentation describing how SAS scores new data, specifically the random effect? It would be beneficial to understand how a new x,y coordinate, the knot data, and the parameter estimate for each knot interact to produce a score for the random effect.

Liang Xie said...

PROC PLM supports scoring GLIMMIX models. Check the SAS Doc for PROC PLM for details. Cheers!