- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi every one
please help me with my problem.
I have the model that estimated by proc nlmixed then i need to plot the actual and predicted.
proc import datafile='C:\Users\Abbas Arkawazi\Desktop\test.xlsx'
DBMS =xlsx Out=test;
run;
proc nlmixed data=test;
parms b0= 10 b1=2 b2=.5 b3= 1 a=2 b=1 s= 150 ;
m = b0+(b1*age)+(b2*gender)+(b3*creatin);
y=urea;
if status_u=1 then f=((a*b)*((1-exp(-exp((y-m)/s)))**(a-1))*((1+((exp(exp((y-m)/s))-1)**(a)))**(-(b+1)))) /(s*exp((-a*exp((y-m)/s))-((y-m)/s))) ;
else f= (1+(((1-exp(-exp((y-m)/s)))/(exp(-exp((y-m)/s))))**a))**-b ;
ll=log(f);
model y ~ general(ll);
run;
please help me to plot the estimated model
thank u very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can then use PROC SGPLOT to graph the predicted versus actuals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Reeza is right. Use the PREDICT statement to generate your predicted values. If M is your mean response, then PREDICT M will get you that predicted value.
You have 3 covariates in the model though. I am not sure what you will want to use as the X axis for your plot. Perhaps group by GENDER and plot either CREATIN or AGE for a specific value of AGE or CREATIN.
The PREDICT statement will provide predicted values for the observations in your DATA= data set, the input to PROC NLMIXED. To create predicted values for additional observations, you will need to write your own scoring code in a SAS Data step. Your equation for M in your PROC NLMIXED code is your scoring equation. Substitute the parameter estimates from NLMIXED and off you go.