Programming the statistical procedures from SAS

Help to understand reliability analysis

Reply
Contributor
Posts: 34

Help to understand reliability analysis

SAS Community, I found this code in an archive at work and it contains no comments. The idea is to calculate a reliable sample size. It is not working properly and I am seeking to understand each component. 

 

The input table cy11rates contains the unique provider ID, risk adjusted rate of complication (rsrr_hwr) and total patient volumn. Is anyone familiar with this process that could help me understand?

 

data temp;
set cy11rates;
numerator=round(rsrr_hwr*volume);
do i=1 to volume;
d=1;
if i<= numerator then n=1;
else n=0;
output;
end;
run;

proc sql;
select sum(volume) into:cnt
from cy11rates;
quit;

proc freq data=temp;
tables provid /out=b;
run;

data c;
set b;
rtsq=count*count;
rtdv=rtsq/&cnt.;
run;

proc summary sum data=c;
var rtdv;
output out=new sum=nv;
run;

data new2;
set new;
t=(&cnt.-nv)/(_freq_-1);
run;

proc print data=new2; run;

proc anova data=temp;
ods output OverallANOVA =anova_result;
class provid;
model n=provid;
run;
quit;

proc sql;
create table reliability as
select distinct (Fvalue-1)/(Fvalue-1+t) as ICC,
t*(calculated ICC)/(1+(t-1)*(calculated ICC)) as reliability,
(0.7-0.7*(calculated ICC))/((calculated ICC)-(0.7*(calculated ICC))) as sample_size
from new2
join anova_result
on 1=1
where anova_result.source='Model';
quit;

Super User
Posts: 10,871

Re: Help to understand reliability analysis

Please describe how "it is not working properly". Error messages? Post the errors and log.

No output? Unexpected output? How is it  unexpected.

 

Also dealing with sample size generation I would recommend looking into proc power.

 

 

Contributor
Posts: 34

Re: Help to understand reliability analysis

Thank you for your reply. I received a sample size that was a negative number. My hope was to better understand the workings of the procedure so I could determine if adjustments are needed or if the code is bad. The hope was to get a general idea of each step. I will look into proc power though and appreciate that suggestion.

Contributor
Posts: 34

Re: Help to understand reliability analysis

My understanding of proc power is to plan sample size for a comparison of means. In my analysis I do not have an intervention. I wish to know the minimum patient volume for a provider group so that a risk adjusted complication rate can be considered stable.

Ask a Question
Discussion stats
  • 3 replies
  • 265 views
  • 0 likes
  • 2 in conversation