Displaying 2 results from an estimated 2 matches for "cogat".
Did you mean:
coat
2011 May 01
1
Simulation Questions
...nch status condition froma binomial distribution with a probability of 0.35
lunch=rbinom(1*1000,1,.35)
#Generate age in months from a random normal distribution with mean of 87 and sd of 2
age=rnorm(1000,87,2)
#invoke the MASS package
require(MASS)
#Establish the covariance matrix for MAP, ITBS and CogAT scores
sigma <- matrix(c(1, 0.84, 0.59, 0.84, 1, 0.56, 0.59, 0.56, 1), ncol = 3)
#Establish MAP as a random normal variable with mean of 200 and sd of 9
map <- rnorm(1000, 200, 9)
#Establish ITBS as a random normal variable with mean of 175 and sd of 15
itbs <- rnorm(1000, 175, 15)
#Esta...
2011 Apr 11
1
Help on calculating a variable using random numbers
I'm new to R, but I'm trying to write a program for a dissertation that generates a dataset as follows...
subject=1:1000
treat=rbinom(1*1000,1,.13)
gender=rbinom(1*1000,1,.5)
eth=runif(1*1000, min=1, max=4)
cogat=rnorm(1*1000, 100, 16)
map=rnorm(1*1000, 200, 9)
simtest=data.frame (subject=subject, treat=treat, gender=gender, eth=round(eth,digits=0), cogat=round(cogat,digits=0),map=round(map,digits=0))
simtest
I need to add a variable named "growth". If the "treat" variable for an obs...