Hi,
Sorry for the potentially novice question but I am stumped on how to plot an exponential decay curve for my data. In addition to this, I also wanted to run analysis on my data with this model but predicting parameters and also p values and r^2 values.
Through digging online and such I came up with this set of code where I predicted starting parameters. I am hoping someone may have an easier solution and can help me run the analysis with my data.
data hosp;
input time sa @@;
infile datalines dlm='09'x;
datalines;
0 84.46011014
0 84.70962302
0 80.96692981
0 82.96303286
1 95.06440758
1 93.69208673
1 85.20864879
1 76.97472372
1.5 59.88309139
1.5 64.62383612
1.5 68.61604221
1.5 55.14234665
2 82.4640071
2 68.61604221
2 67.74274713
2 57.88698834
3 94.19111249
3 75.72715932
3 78.97082677
3 77.34899304
4 78.47180101
4 55.01759021
4 54.89283377
4 83.96108438
5 61.13065579
5 45.91037006
5 43.29048482
5 54.01953869
;
proc sgscatter; plot time*sa;
proc nlmixed data=hosp;
parms g0=84.537 g1=-0.078 sigma=1.3;
mu=g0*exp(g1*time);
model sa ~ normal(mu,sigma*sigma);
predict g0*exp(g1*time) out=fit;
proc sgplot data=fit;
scatter x=time y=sa;
series x=time y=pred;
Thanks in advance and sorry again for the novice question.