Bookmark and Share

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


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

Re: st: RE: variance in glm


From   Keith Dear <[email protected]>
To   [email protected]
Subject   Re: st: RE: variance in glm
Date   Thu, 3 Mar 2011 11:55:43 +1100

Argyn,
You might consider calculating squared residuals and modelling those as as
function of X using gamma errors (glm).  If the original errors Ei are
normal, their squares will be distributed proportional to chi-squared
(special case of gamma). Then you can test for constant variance, which
would be rejected if the mean of the squared residuals turns out to depend
on X.
Keith

On 3 March 2011 03:31, Argyn Kuketayev
<[email protected]> wrote:
> let me reformulate the problem then.
>
> i have a set of observations (Xi, Yi). Xi and Yi are both discrete
> numbers. my current hypothesis is that Yi = b1 Xi + b2 + Ei, where Ei
> is an error term, maybe Gaussian. I think that Var[Ei] is not
> constant, and want to estimate it somehow. the sample size is ~500,
> and some Xi values repeat in observations, up to 30-40 times, i.e. i
> could compute Var[Yi] for some Xi values directly, on the other hand
> many Xi values don't repeat, i.e. there's only one observation with a
> given Xi.
>
> so, how to compute Var[Ei] for a any given Xi in Stata? preferably in
> some non-parametric way
>
> On Tue, Mar 1, 2011 at 4:07 PM, Wooldridge, Jeffrey <[email protected]> wrote:
>> I guess this is beyond my knowledge of how the glm command works in
>> Stata.
>
> thanks
> --
> Argyn Kuketayev
> *
> *   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/
>



-- 
Dr Keith Dear
National Centre for Epidemiology and Population Health
ANU College of Medicine, Biology and Environment
Australian National University
Canberra, ACT 0200 Australia
CRICOS provider #00120C
Phone +61 (02) 6273 2208
Mobile 0424 450 396

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index