Skip to content
Prev 15540 / 20628 Next

simulating a linear random intercept model with exogeneity assumption

Hi r-sig group
I want to know how to write the code of simulating a linear random intercept model with following assumptions using R programing:
the model:
yij=b.+b1 xij + u.j + eij, ?where j refer to the group number and i refer to the observation number in the j group
model assumptions:
1- xij ~ N (3,1.5)2- u.j ~ N (0,1)3- eij ~ N (0,1)4- cov (xij , u.j)=0
5- cov (xij , eij)=0
6- cov (u.j , eij)= 0
thnx for help
mervat