Dear R users

I have a data set which has five variables. One depenedent variable y, and 4
Independent variables (education-level, householdincome, countrygdp and
countrygdpsquare). The first two are data corresponding to the individual
and the next two coorespond to the country to which the individual belongs
to. My data set does not make this distinction between individual level and
country level. Is there a way such that I can make R make countrygdp and
countrygdpsquare at a different level than the individual level data. In
other words I wish to transform my dataset such that it recognizes two
individual level variables to be at Level-1 and the other two country level
variables at Level-2.

I need to run a multilevel model, but first I must make my dataset recognise
data at Level-1 and Level-2. How can I create this country level group (gdp
and gdp^2) such that I can perform a multilevel model as follows:

lmer(y ~ education-level + householdincome + countrygdp + countrygdpsquare +
(1 I Level2),family=binomial(link="probit),data=dataset)

Please kindly help me with the relevant commands for creating this Level2
(having two variables)

Thanks
Saurav





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

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to