Proc NLMIXED does not run

Accepted Solution Solved
Reply
Super Contributor
Posts: 303
Accepted Solution

Proc NLMIXED does not run

I wish to ask if any one could tell me why this procedure does not run;

ods html close;

options nosource nonotes;

ods html close;

*%LET seed =-1;

%macro surv(replicates=);

%do p=1 %to &replicates;

data test_&p;

seed=-1;

intercept = 0.104;

beta=0.405;

do i = 1 to 100;

X=1+0.742*rannor(-1); *Normal mean 1 and standard deviation 1;

t=exp(X);

linpred = intercept + t*beta;

prob = exp(linpred)/ (1 + exp(linpred));

U=uniform(0);

y = U > prob;

if t<1 then time=1; else time=t;

if t<1 then censored=1; else censored=0;

if censored=1 then obs=0; else obs=1;

output;

end;

run;

proc nlmixed data=test_&p;

parms b0=0 b1=0 c0=1 c1=1;

p=1/(1 + exp(-(b0+b1*log(x))));

q=0;

do k=0+(0.01/1e4) to 1 by (0.01/1e4);

q=q+exp(y*(b0+b1*log(k)))/(1+exp(b0+b1*

log(k)))*pdf("lognormal",k,c0,c1);

end;

q=q*(0.01/1e4);

logL = y*log(p)*(1-obs)+

(1-y)*log(1-p)*(1-obs)+

log(pdf("lognormal",x,c0,c1))*(1-obs)+

log(q)*obs;

model y~general(logL);

ods output ParameterEstimates=ML_&p;

run;

/*dm 'log;clear;output;clear;';*/;

%end;

%mend surv;

%surv(replicates=1);

ods html;


Accepted Solutions
Solution
‎06-10-2014 04:17 PM
Super User
Posts: 11,343

Re: Proc NLMIXED does not run

Posted in reply to desireatem

A good start would be a run statement after ods output statement.

Also turning of HTML sometimes means things like the ODS output can't be accesses, at least in my SAS 9.2.3.

View solution in original post


All Replies
Solution
‎06-10-2014 04:17 PM
Super User
Posts: 11,343

Re: Proc NLMIXED does not run

Posted in reply to desireatem

A good start would be a run statement after ods output statement.

Also turning of HTML sometimes means things like the ODS output can't be accesses, at least in my SAS 9.2.3.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 153 views
  • 1 like
  • 2 in conversation