search for: predictor_names

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

2009 Jul 15
0
strategy to iterate over repeated measures/longitudinal data
...ctor1 = sample(c("a","b"),10,replace=TRUE), predictor2 = sample(c("a","b"),10,replace=TRUE), predictor3 = sample(c("a","b"),10,replace=TRUE), measurement1=rnorm(10), measurement2=rnorm(10)) #vector of names to iterate over predictor_names <- colnames(wide_data)[2:4] #vector to store coefficients mycoefs <- rep(-1,length(predictor_names)) names(mycoefs) <- predictor_names for (predictor in predictor_names) { long_data <- make.univ( data.frame(wide_data$id,wide_data[,predictor]), data.frame( wide_data$meas...