- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to run a logistic ANOVA by the PROC GENMODE for data with binomial distribution with the SAS ver. 9.2 TS Level 2M2. The experiment has a factorial arrangement. The problem is that the code I used to write with a former version of SAS is not working any more. I got some advise from the SAS technical support but I still have problems with the syntax. Can anybody help me with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You need to post the code and log for any help
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Only if you post your code, could us help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The former code using proc genmod was, for instance, as follows:
model filled/nij= ecotype nitrogen ecotype*nitrogen/dist=binomial link=logit type3;
lsmeans ecotype nitrogen/diff;
ods output lsmeans=lsm;
data prob_hat;
set lsm;
phat=exp(estimate)/(1+exp(estimate));
se_phat=phat*(1-phat)*stderr;
proc print data=prob_hat;
run;
This code yielded lsm probability for treatments and standard error of the lsm probabilities.
The current code is:
model fille/nij=ecotype nitrogen ecotype*nitrogen/dist=binomial link=logit type 3;
lsm ecotype nitrogen/diff;
proc print;
run;
but this code produces the standard error not in the original unities but in the logit ones. Is there any way to obtain directly the standard error in the original unities?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Isn't that what this portion of code did in the above which is no longer in your new code?
Thought the stderr should have been converted as well I'd think...
data prob_hat;
set lsm;
phat=exp(estimate)/(1+exp(estimate));
se_phat=phat*(1-phat)*stderr;
run;
proc print data=prob_hat;
run;
But perhaps I'm not understanding what you'd like.
Also your proc print doesn't have a data= attached to it, so after running a proc I'm not sure what it would output, have you verified that its outputing what you think it should?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, there is. In your lsmeans statement, add the ilink option:
lsmeans ecotype nitrogen/diff ilink:
This will give the estimates and standard errors on the inverse linked (back-transformed scale). Note well that the DIFFERENCES are not the differences between the back-transformed values, but are the back-transformed values of the differences on the logit scale--a very different thing.
Steve Denham