Hi everyone!
I'm running a weighted linear regression with the following code;
proc reg data=mydata ;
weight variance;
model sur_estim_y= sur_estim_x;
run;
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
This is what I found: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjngf_OgKT9A...
R-squared is simple the square of the correlation coefficient, which is what this paper gets confidence intervals for.
Thanks a lot!
I used proc corr and obtained the same Rsquare as from proc reg (corr coefficent **2)
However i'm not sure I how to use standard error from the corr coefficent to compute 95%CI for the Rsquare estimates
You obtain the confidence limits for the correlation coefficient r as shown in the article. Then you square them to get the confidence limits for R-squared.
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;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.