# How to add a random perturbation term to the response variable, with transformation in R?

I'm trying to add a random perturbation term to my response variable (to estimate the impact of multicolinnearity in the beta estimates), but I am not sure on how to accomplish it when the response variable is transformed using a 1/4 power, in R.

Without any transformation in the response variable, according to Faraway's "Linear Models with R," the way to write it is:

g <- lm(hipcenter+10*rnorm(38) ~ ., seatpos).


So if I have a 1/4 power transformation for the response variable, then the code should be:

g <- lm((hipcenter^(1/4))+10*rnorm(38) ~ ., seatpos).


Is this right?

-
Why don't you construct another variable in your data.frame that is transformed and use that one in your model? Something along the lines of seatpos$hipcenter_trans <- seatpos$hipcenter^(1/4) + 10 * rnorm(38). To answer your question, yes, you are powering your variable and adding some noise that has mean of ~0 and SD of 10. – Roman Luštrik Aug 31 '12 at 8:35
Are you aware of the perturb package in R? It seems to do exactly what you want. – Peter Flom Aug 31 '12 at 10:36
I just wanted to thank Roman and Peter for their helpful advice. – Dan Sep 1 '12 at 19:30