Dear R users
My data set is e

> names(e)
 [1] "yearctry"     "discent"      "age"          "gender"
"gemeduc"      "gemhhinc"     "ref_group"    "fearfail_ref" "knowent_ref"
"nbgoodc_ref"
[11] "nbstatus_ref" "estbbuso_ref" "lngdp"        "lngdpsq"
"es_gdppcppp"  "sq_gdppcppp"  "estbbo_m"     "es_gdpchg"

hear I have variables representing two levels, namely individual level and
country level. My data is thus a 2 level data. the country level variables
(level-2) are "lngdp"        "lngdpsq"      "es_gdppcppp"  "sq_gdppcppp"
"estbbo_m"     "es_gdpchg" grouped by "yearctry" and the rest of the
variables are individual level (level-1).

the  number of Individual observations are 655078 and number of yearctry ie
groups =239, however when I model a probit to see the influence of 4
individual level var (ie age gender gemeduc and gemhhinc) and one country
level var (es_gdppcppp) using

> prb1<-lmer(discent~age+gender+gemeduc+gemhhinc+es_gdppcppp+(1 |
yearctry),family=binomial(link="probit"),data=e)

I get

Generalized linear mixed model fit by the Laplace approximation
Formula: discent ~ age + gender + gemeduc + gemhhinc + es_gdppcppp + (1
|      yearctry)
   Data: e
    AIC    BIC logLik deviance
 194043 194122 -97014   194029
Random effects:
 Groups   Name        Variance   Std.Dev.
 yearctry (Intercept) 4.0708e-06 0.0020176
*Number of obs: 655078, groups: yearctry, 1*
Fixed effects:
              Estimate Std. Error z value Pr(>|z|)
(Intercept) -7.578e-01  1.839e-02  -41.20  < 2e-16 ***
age         -2.441e-03  2.990e-04   -8.16 3.30e-16 ***
gender      -2.886e-01  7.710e-03  -37.43  < 2e-16 ***
gemeduc      9.244e-05  6.930e-06   13.34  < 2e-16 ***
gemhhinc    -8.938e-07  1.359e-07   -6.58 4.75e-11 ***
es_gdppcppp -2.459e-05  2.691e-07  -91.40  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
            (Intr) age    gender gemedc gmhhnc
age         -0.580
gender      -0.563 -0.138
gemeduc     -0.373  0.166  0.011
gemhhinc    -0.009 -0.132 -0.024 -0.201
es_gdppcppp -0.490  0.071  0.314 -0.297  0.256
*The model did not recognise group to be yearctry and shows 1 instead of
239,* can somebody help me as to how to make my model recognise es_gdppcppp
as a country level variable grouped by yearctry (such that yeractry no of
obs should be 239)

Please help
Thanks in advance
Saurav






-- 
Dr.Saurav Pathak
PhD, Univ.of.Florida
Mechanical Engineering
Doctoral Student
Innovation and Entrepreneurship
Imperial College Business School
s.pathak08@imperial.ac.uk
0044-7795321121

	[[alternative HTML version deleted]]


