search for: hollings_enrol

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

Did you mean: hollings_enroll
2010 Jun 04
2
using string as variable name in model
...16 16 zSS_WJ_AP 17 17 zSS_WJ_MF What I'm trying to do is varnames[1,2] -> outcome lm(outcome ~ income + covariate1 + coviarate2, data=my.data) -> model I get the following error message: "Error in model.frame.default(formula = outcome ~ Hollings_Enroll + Child_sex + : variable lengths differ (found for 'Hollings_Enroll')" But when I run the model: lm(zCANTAB_log_IED_totaltrials ~ income + covariate1 + coviarate2, data=my.data) -> model it works fine. Eventually, once I resolve this, I'd like to make a custom R function...