@SteveDenham @StatDave First of all: Many thanks to both of you! As I've already pointed out I'm new to SAS so I think - at the moment - it looks like it's too complicated for me to compare different fungi with one code. As it's possible to estimate single parameters I will simply compare them by their confidence interval. I will try to estimate the slope at b50 (for the 4 parameter logistic model) with the first derivation of the function at this point. But I've got some problem with fitting my data to the model. As the data for one fungus is gappy the model is'nt able to fit the data properly. I don't know if it's therefore just impossible to fit these data or if I'm missing something. Here is the code I've used to fit the data from one repetition of fungus A, which works fine data fungi;
input time germrate;
datalines;
96 .95
24 .93
21 .87
18 .52
15 .11
12 .05
9 .01
;
run;
proc nlmixed data=fungi;
parms bu=.95 bl=.001 b50=.20;
mu = bu + (bl-bu)/(1+(time/b50)**bs);
l = mu**germrate * (1-mu)**(1-germrate);
ql = log(l);
model germrate ~ general(ql);
predict mu out=out1;
ods output parameterestimates=pe;
run;
proc sql noprint;
select count(Parameter) into :nparm from pe;
quit;
title "Scale parameter";
title2 "Pearson Chi-square / DF";
proc sql;
select sum(phi_i) format=best12. as Scale into :phi from
(select (germrate-pred)**2/(pred*(1-pred)*(count(germrate)-&nparm)) as phi_i from out1);
quit;
title;
proc nlmixed data=fungi;
parms bu=.98 bl=.001 b50=.20;
mu = bu + (bl-bu)/(1+(time/b50)**bs);
l = mu**germrate * (1-mu)**(1-germrate);
ql = (1/&phi)*log(l);
model germrate ~ general(ql);
predict mu out=FPLout;
run;
proc sgplot data=fplout noautolegend;
band upper=upper lower=lower x=time;
scatter y=germrate x=time;
series y=pred x=time;
xaxis label="time after inoculation" ;
yaxis label="germination rate" values=(0 to 1 by 0.1) ;
title "4-parameter Logit Model";
run;
but with this data from fungi B (+ some imaginary data for t=120 and t=150 to suggest the upper limit) and renewed parm starting points, it doesn't work. Any further ideas? data fungi;
input time germrate;
datalines;
150 .89
120 .89
96 .88
27 .21
24 .15
21 .08
18 .01
15 .01
12 .01
9 .01
;
run;
proc nlmixed data=fungi;
parms bu=.90 bl=.01 b50=41;
mu = bu + (bl-bu)/(1+(time/b50)**bs);
l = mu**germrate * (1-mu)**(1-germrate);
ql = log(l);
model germrate ~ general(ql);
predict mu out=out1;
ods output parameterestimates=pe;
run;
proc sql noprint;
select count(Parameter) into :nparm from pe;
quit;
title "Scale parameter";
title2 "Pearson Chi-square / DF";
proc sql;
select sum(phi_i) format=best12. as Scale into :phi from
(select (germrate-pred)**2/(pred*(1-pred)*(count(germrate)-&nparm)) as phi_i from out1);
quit;
title;
proc nlmixed data=fungi;
parms bu=.90 bl=.01 b50=.40;
mu = bu + (bl-bu)/(1+(time/b50)**bs);
l = mu**germrate * (1-mu)**(1-germrate);
ql = (1/&phi)*log(l);
model germrate ~ general(ql);
predict mu out=FPLout;
run;
proc sgplot data=fplout noautolegend;
band upper=upper lower=lower x=time;
scatter y=germrate x=time;
series y=pred x=time;
xaxis label="time after inoculation" ;
yaxis label="germination rate" values=(0 to 1 by 0.1) ;
title "4-parameter Logit Model";
run;
Furthermore, do you have any suggestions on how to provide the data from different repetitions to this model, as every time I've tried this in the manner I'm used to from other models it doesn't work either.
... View more