[R] What is the SAS equivalent of this R glm() code?
pdalgd at gmail.com
Fri Dec 3 23:15:01 CET 2010
On Dec 3, 2010, at 22:42 , Paul Miller wrote:
> Hello Everyone,
> I'm trying to use SAS to replicate some results obtained in R. I was wondering if anyone call tell me the SAS equivalent of the code that appears below.
> fm.glm.x <- glm(resp ~ . - 1, data = as.data.frame(mm.x),
> na.action = na.exclude, family = binomial(link = "probit"))
Well, you're not saying what "." contains, so no-one can foresee all implications, but the closest parallels are usually found with PROC GENMOD. Something like
proc genmod data=ingot2;
model r/n=t / dist=binomial link=probit;
(shamelessly lifted from a Google search)
- I don't think you can avoid spelling out the list of variables in "."
- "-1" (no intercept) is obtained by adding "noint" after the "/" in the model statement
- for binary regression, I believe you may have to explicitly generate a variable n=1
- beware differences in contrast parametrizations for categorical variables
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help