Michael Haenlein wrote
Dear all,
I would like to use predict.lm to obtain a set of predicted values
based on
a regression model I estimated.
When I apply predict.lm to two vectors that have the same values, the
predicted values will be identical. I know that my regression model
is not
perfect and I would like to take account of the error inherent in
the model
within my predictions. So, while I understand that the expected
value of
both vectors should be the same (since they have the same value), I
would
like to have different predictions to take account of the error
inherent in
my model.
I assume I can probably use se.fit to achieve my objective of including
"random error" in my predictions but I don't really know how.
Could
anybody
give me a pointer on how this can be done?
Thanks,
Michael
[[alternative HTML version deleted]]
______________________________________________
[hidden email]
<http://r.789695.n4.nabble.com/user/SendEmail.jtp?type=node&node=4663740&i=0>
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.
« [hide part of quote
<http://r.789695.n4.nabble.com/predict-lm-tt4663647.html#>]
I guess that, given the fact that you know how good/bad your models are,
you can specify an additional error therm (a random variable with given
mean and standard deviation). That variable will "cause" the predicted
values to be different every time you predict the outcome. The model you
have fitted are a linear model after all (You just need to add the error).
Hope it helps,
Marko
--
Marko Tonc(ic'
Assistant Researcher
University of Rijeka
Faculty of Humanities and Social Sciences
Department of Psychology
Sveu?ilis(na Avenija 4, 51000 Rijeka, Croatia
[[alternative HTML version deleted]]