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

Re: st: RE: Shrinkage factor

From   Maarten buis <>
Subject   Re: st: RE: Shrinkage factor
Date   Thu, 15 Oct 2009 14:00:04 +0000 (GMT)

--- On Thu, 15/10/09, Evans Jadotte wrote:
> I am probably having some syntax problem in Stata to get
> around this issue. My original estimation is:
> . xi: quietly xtmixed  logequiv $vul_list ||strata:
> ||cluster:, var
> *So, I believe the the way to get the shrinkage factor per
> number of cases is:
> . local
> Rjs=[lns1_1_1]_cons^2/([lns1_1_1]_cons^2+exp([lnsig_e]_cons)^2/nj)
> * All seem clear, except the nj (unbalanced). Trying to way
> you suggested, I am not sure which variables the vars
> (neither the ids) stand for since what I got is the
> following message
> . gen miss = missing(lns1_1_1, lns2_1_1, lnsig_e)
> lnsig_e not found
> r(111);

The var in my example stands for variable not variance. The miss
variable is there to make sure that you ignore missing values in
your estimation. A safer way in which you can also get that is 
by typing:

gen byte miss = !e(sample)

The ! is a negation, and e(sample) identifies those cases used in
the estimation

The ids are your grouping identifiers, so identifying whatever 
your j-index represents.

-- Maarten
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

Send instant messages to your online friends 

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index