I'm running a weighted linear regression with the following code;
proc reg data=mydata ;
model sur_estim_y= sur_estim_x;
I want to obtain the 95%CI of the Rsquare estimate (or the standard dev of the Rsquare estimate)
In the manual I saw the possibility to compute 95%CI for the parameter estimates but not for the Rsquare.
Does anyone know how to do it?
Thanks a lot
R-squared is simple the square of the correlation coefficient, which is what this paper gets confidence intervals for.
Yes. RSquare is just the square of correlation between Y and Yhat(Y predicted value).
You could use fisher options of PROC CORR to get its CI .
proc reg data=sashelp.class ; weight age; model weight= height; output out=want predicted=p; quit; ods output FisherPearsonCorr=FisherPearsonCorr; proc corr data=want outp=outp fisher; var weight; with p; weight age; run; data FisherPearsonCorr; set FisherPearsonCorr; RSquare=Corr**2; lcl_rsquare=lcl**2; ucl_rsquare=ucl**2; run; proc print noobs;run;
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.