Help using Base SAS procedures

Help needed for Proc NLMIXED!!!

Reply
N/A
Posts: 0

Help needed for Proc NLMIXED!!!

Hi, I have some problems with Proc NLMIXED. I have coded a two part model with general likelihood. But I am wondering if there is a simple way to deal with categorical variables in Proc NLMIXED? Just like the CLASS statement in other Proc.

Also I wish to do model selection in the future. But how can I code a macro to do automatic model selection?

Thanks!


proc nlmixed data= “…” TECH=dbldog;

parms b00=0 b10=0 b20=0 b30=0 b40=0 b0=0 b1=0 b2=0 b3=0 b4=0 sigma=1 delta=-2;
Z1=b0 + b1*x1 + b2*x2 + b3*x3 + b4*x4;
Z0=b00 + b10*x1 + b20*x2 + b30*x3 + b40*x4; temp=SQRT(sigma**2+delta**2);
P0=CDF('normal',-Z0);
if y=0 then P=P0;
else if y^=0 then P=(1-P0)*2/temp*PDF('normal',(y-Z1)/temp)*CDF('normal',delta/sigma*(y-Z1)/temp);
ll=log(P);
model y~GENERAL(ll);
bounds sigma>0;
run;
Ask a Question
Discussion stats
  • 0 replies
  • 98 views
  • 0 likes
  • 1 in conversation