Dear All,
I am a new R user but currently working on my dissertation which request that I fit multilevel model to a given situation that can be located below and then simulate the fitted model 10000 times.

Set up a simulation model according to the following recipe in R:
n=number of observation=1000, 
xi~N(0,1), is a predictor.
Wi~N(0,1), links to birth weight.
Ni~Poisson(mean=variance=2), number of children per woman.
Vij~N(0,1), child predictor
Zij~N(0,1), is an error term.
Yij(birthweight)=a+bxi+cvij+d(ρwi+(√1-ρ2)zij)
Where, 
a=3.1, b=0.2, c=0.3, d=0.3, ρ=(0,1)
Note: use the interval for ρ on 0, 0.01, 0.02, 0.03, …0.99, 1)
1)	Fit multilevel model for the above.
2)	Calculate the standard errors of the estimates, t-values, p-values and store them.
3)	Run this recipe 10000 times in a loop.
4)	How many times is p-value<0.05
5)	How does this vary according to ρ?

I am available to provide further clarification on the task should you request for.
Could someone help me in this regards.
I do appreciate any assistance given me.
Many thanks in advance. 

 
Kind regards.
 
Justice Moses K. Aheto
(Chief Executive Officer)
Statistics & Analytics Consultancy Services Ltd.
E-mail: justiceaheto@yahoo.com
Mobile:00447417589148
	[[alternative HTML version deleted]]

