[R] How can I fit a fixed-effect linear model or generalized linear model with method="ml"?

Doran, Harold HDoran at air.org
Sun May 30 12:34:54 CEST 2010


Why are you not using the lm() function? OLS is ML with no random effects
________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Sherrie Jin [jingoosy at gmail.com]
Sent: Sunday, May 30, 2010 5:05 AM
To: r-help at r-project.org
Subject: [R] How can I fit a fixed-effect linear model or generalized linear    model with method="ml"?

Hi,

I want to fit a linear model (without any random effect) with method "ml". I
tried to use "glm"  I found that there is no option for "ml" or "reml" and
the default one is "reml". THen I tried to use "lme" but it requires a
random effect. How can I fix this problem?

Of course, it's not necessary to be "glm" or "lme", I am just looking for
commands which allow me to fit a linear model (without any random effect)
with "ml" method. And later I may also need to fit generalized linear models
(probit, gamma and negtive binomial) with method "ml". Any suggestions?

Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list