BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Lorezo
Calcite | Level 5

Hi,

 

I am currently trying to have SAS output a p value for the parameter estimates of my model. I am currently trying to use an exponential decay curve. I have used the following inputs to have everything I need except the p values for the parameter estimates. Any helpful advice in the right direction would be great!

 

Thank you!

 

data tmaga;

            input time sa;

infile datalines dlm='09'x;

            cards;

 

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

;

run;

 

PROC NLIN Data=tmaga;

PARMS a=89 b=1;

MODEL sa = a*exp(-time/10)*b;

output out=modeltmaga predicted=sapred r=saresid;

run;

 

proc sort data=modeltmaga; by time; run;

 

proc sgplot data=modeltmaga;

scatter x=time y=sa;

series x=time y=sapred;

run;

 

Proc corr data=modeltmaga;

    var time sapred;

 

proc summary data=modeltmaga;

     var saresid sa;

     output out=stats css(sa)=Total_SS uss(saresid)=Residual_SS;

run;

 

data modeltmaga;

     set stats;

     Rsqaured=1-(Residual_SS/Total_SS);

run;

 

proc print data=modeltmaga;

run;

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Your equation is not right for estimating the decay rate. You should use:

 

PROC NLIN Data=tmaga outest=tmagaEst plots=fitplot;
PARMS a=90 b=0.12;
MODEL sa = a*exp(-b*time);
estimate "Decay" b;
run;

PGStats_0-1607899109343.png

....

PGStats_1-1607899143335.png

Thus, a decay estimate of 0.07 per time unit and a p-value = 0.0022

PG

View solution in original post

2 REPLIES 2
PGStats
Opal | Level 21

Your equation is not right for estimating the decay rate. You should use:

 

PROC NLIN Data=tmaga outest=tmagaEst plots=fitplot;
PARMS a=90 b=0.12;
MODEL sa = a*exp(-b*time);
estimate "Decay" b;
run;

PGStats_0-1607899109343.png

....

PGStats_1-1607899143335.png

Thus, a decay estimate of 0.07 per time unit and a p-value = 0.0022

PG
Lorezo
Calcite | Level 5
Thanks so much this works perfect!