I work in a world with SAS on the desktop and SAS on a server. Unfortunately they do not have all of the same PROCs licensed on both platforms. We do not have the budget to add IML to the server so I am reaching out to the community. I myself have never worked with IML, but some of the other departments that place tools on the server do use IML. I need help deconstructing the following code to just SAS, we have STAT/OR/QC/ETS on both platforms.
Is there a way to do this with a different set of PROCs?
proc iml;
R=0.4;
p1=0.5;
p2=0.5;
p3=0.5;
start Q1f(t);
alpha1=1; alpha2=2; alpha3=2;
shape1=2; shape2=3; shape3=1.5;
v1=cdf("WEIBULL",t, shape1, alpha1);
v2=cdf("WEIBULL",t, shape2, alpha2);
v3=cdf("WEIBULL",t, shape3, alpha3);
Q1=PDF("WEIBULL",t, shape1, alpha1)*(1-v2)*(1-v3);
return(Q1);
finish;
start Q2f(t);
alpha1=1; alpha2=2; alpha3=2;
shape1=2; shape2=3; shape3=1.5;
v1=cdf("WEIBULL",t, shape1, alpha1);
v2=cdf("WEIBULL",t, shape2, alpha2);
v3=cdf("WEIBULL",t, shape3, alpha3);
Q2=PDF("WEIBULL",t, shape2, alpha2)*(1-v1)*(1-v3);
return(Q2);
finish;
start Q3f(t);
alpha1=1; alpha2=2; alpha3=2;
shape1=2; shape2=3; shape3=1.5;
v1=cdf("WEIBULL",t, shape1, alpha1);
v2=cdf("WEIBULL",t, shape2, alpha2);
v3=cdf("WEIBULL",t, shape3, alpha3);
Q3=PDF("WEIBULL",t, shape3, alpha3)*(1-v1)*(1-v2);
return(Q3);
finish;
a = {0 .P };
call quad(Z1, "Q1f", a);
call quad(Z2, "Q2f", a);
call quad(Z3, "Q3f", a);
print Z1[format=E16.6] Z2[format=E16.6] Z3[format=E16.6];
p_task=Z1*p1+Z2*p2+Z3*p3;
R_equiv=R/(1-p_task);
print p_task[format=E16.6] R_equiv[format=E16.6];
run;
quit;
... View more