Hello,
Please I would love to run this logistic procedure with proc nlin or proc nlimixed, any ideas please? the codes I tried are below. Thanks
proc logistic data = rsm1;
model edema (event="1") = DoseA DoseT DoseA*DoseT DoseA*DoseA DoseT*DoseT/link = probit;
output out=pred p=prob;
run;
**This did not work
proc nlmixed data = rsm1; call streaminit(123456);
parms beta0=1 beta1=1 beta2=1 beta11=1 beta12=1 beta22=1 s2=1;
y2 = (beta0 + beta1*DoseA + beta2*DoseT + beta11*DoseA*DoseA
+ beta22*DoseT*DoseT + beta12*DoseA*DoseT);
p = exp(y2)/(1+exp(y2));
model Edema~binary(p);
predict y2 out=y2;
run;
**I'm not getting same results with this:
proc nlin data =rsm1 method=newton;
parms beta0=1 beta1=1 beta2=1 beta11=1 beta12=1 beta22=1;
y2 = (beta0 + beta1*DoseA + beta2*DoseT + beta11*DoseA*DoseA
+ beta22*DoseT*DoseT + beta12*DoseA*DoseT);
p = probnorm(edema);
if (edema = 1) then p = 1-p;
model p=y2;
output out=p p=predict;
run;
@ojibous wrote:
Please I would love to run this logistic procedure with proc nlin or proc nlimixed, any ideas please?
Why? What do you gain by taking PROC LOGISTIC code and getting it to run in another PROC?
This did not work
A lot more information is needed than "This did not work". What didn't work? How do you know? What do you see? Is there an error in the log, or the results are wrong, or both, or something else? Show us the wrong log or the wrong results. SHOW US.
**I'm not getting same results with this:
We don't know what you mean again. SHOW US. Although, honestly, I would not expect PROC LOGSITIC and PROC NLIN to produce the exact same results, and I doubt that different results are by themselves are problem.
Both NLIN and NLIMIXED are for non-linear model.
But Logistic model is linear model , so try PROC GLIMMIX .
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.