Hey guys,

for educational purposes I wonder if it is possible to simulate
different data sets (or specifically residuals) for a linear regression.
I would like to show my students residuals with different means,
variances and distributions (normal, but also not normal) in the plots
created with the plot command for a lm-object. In addition it would be
nice to simulate although influencal values (high cooks distance and
leverage)

lm.results <- lm(y~x,data)
plot(lm.results)

Is there an easy way to do this? Or can this be done at all (and if yes,
any hints?:-)

Thanks and Greetings!
Friedericksen

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to