Sunday, 15 April 2012

statistics - Proc Reg Make Prediction With New Observations -



statistics - Proc Reg Make Prediction With New Observations -

i trying create prediction interval based on linear model in sas. sas code is

proc reg data=datain.aswells alpha=0.01; model arsenic = latitude longitude depth_ft / clb; run;

i wish create 95% prediction interval latitude=23.75467, longitude=90.66169, , depth_ft=25. info point not exist in info set, in range of values used compute model. there easy way of accomplishing in sas? shouldn't there way compute prediction interval in sas easily?

the easiest thing add together input info set missing value arsenic. utilize output statement output prediction intervals.

here example:

data test; i=1 100; x1 = rannor(123); x2 = rannor(123)*2 + 1; y = 1*x1 + 2*x2 + 4*rannor(123); output; end; run; info test; set test end=last; output; if lastly do; y = .; x1 = 1.5; x2 = -1; output; end; run; proc reg data=test alpha=.01; model y = x1 x2; output out=test_out(where=(y=.)) p=predicted ucl=ucl_pred lcl=lcl_pred; run; quit;

the clause on output filters resulting set missing value predicted. can remove , predicted values , prediction intervals.

statistics sas

No comments:

Post a Comment