search for: v_gk

Displaying 1 result from an estimated 1 matches for "v_gk".

Did you mean: _gk
2005 Dec 01
1
Simulate Correlated data from complex sample
...nt. Any thoughts are much appreciated, Harold Ver 2.2 Windows XP N <- 5000 # Number of students J <- 50 # Number of schools N_j <- N/J # Number of students in each school a_g <- c(0,.5,1) # This is the growth vector # Step 1 -- create psi for base grade rps <- rep(N_j, J) v_gk <- rep(rnorm(J, 0, sqrt(.01) ), rps) v_gik <- rnorm(N, 0, sqrt(.99)) # Organize into a dataframe data <- data.frame(schid = rep(1:J, rps), stuid = 1:N, cbind(v_gk, v_gik), psi = v_gk + v_gik + a_g[1]) # Now create theta B_g <- .95 # This is correlation between within-grade trait a...