Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

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


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <mventura@istat.it> 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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index