Thanks for your reply.
I should have made my question clearer. Yes, I want to estimate standard
errors with the method "ml" rather than "reml". According to your
suggestion, I looked at the source code for "summary.glm". Now I know it's
"summary.glm" rather than "glm"  itself estimates the standard errors. So it
must be "summary.glm" that uses "reml" as a default to compute standard
errors.

But when I read the source code for "summary.glm", I'm still confused. How
can I modify the code to re-compute the standard errors with method "reml"?
I'm pretty new to R and haven't write any code by myself. Thanks.

On Sun, May 30, 2010 at 8:01 AM, Prof Brian Ripley <ripley@stats.ox.ac.uk>wrote:

> On Sun, 30 May 2010, Achim Zeileis wrote:
>
>  On Sun, 30 May 2010, Sherrie Jin wrote:
>>
>>  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?
>>>
>>
>> glm() always performs Maximum Likelihood estimation and thus has no
>> method="ml" argument.
>>
>
> ML of what?  For the coefficients, yes.  However, for parameters in the
> distribution estimated via the dispersion, not usually and not in the case
> of sigma^2 for the gaussian.
>
> Strictly, neither lm() not glm() estimate the dispersion, but their
> summary() methods do.  However, you can use your own estimate of dispersion
> and supply it to summary.glm (but not summary.lm): you can also use gls()
> from package nlme.  MASS (the book) discusses how to get MLE for a gamma
> glm, for example, and MASS::glm.nb fits a negative binomial glm with
> parameters estimated by ML.
>
> --
> Brian D. Ripley,                  ripley@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/>
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>

	[[alternative HTML version deleted]]

