Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: conditional SE of y|X in glm

From   Nick Cox <>
Subject   Re: st: conditional SE of y|X in glm
Date   Tue, 24 Apr 2012 09:57:25 +0100

See -glmcorr- (SSC) for one approach here. That calculates an rmse
which appears similar, if not identical, to what you want. I like to
have such measures accessible for comparing -glm- results  with those
of other models in which rmse appears naturally. Perhaps it is a
comfort blanket, but there you go.

Note that putting a constant into a variable is usually overkill as

di sqrt(e(dispers))

does the calculation. Use a scalar or local macro if you want to store
the value.

On Tue, Apr 24, 2012 at 9:31 AM, Marco Ventura <> wrote:

> from a GLM estimate I want to retrieve the conditional standard error of y
> given the covariates. If I do
> gen sigma=sqrt(e(dispers))
> do I always get the right thing independently of any family and link?
> Should I correct it by sqrt(e(dispers)* (_N-1)/_N)?
> And do you think I should instead use the Pearson residuals such as
> gen sigma=sqrt(e(dispers_p))
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index