Thanks all for your input. I just wanted to check I got this correctly. For age, I should generate the variable using rnormal (as I expect it to be normally distributed) while for the Likert scale measure I would use
Is that correct?
I am not sure how to implement the second suggestion:
Code:
rbinomial(10, 0.45)
I am not sure how to implement the second suggestion:
And if you're including other respondent characteristics as predictors, e.g, respondent's age, then I'd sample the predictors rowwise for the reason Nick implied in #12.
Comment