search for: child_sex

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

Did you mean: child_idx
2010 Jun 04
2
using string as variable name in model
...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 to automatica...