[R] how to generate response variables using simple regression
R. Michael Weylandt
michael.weylandt at gmail.com
Mon Aug 27 04:46:19 CEST 2012
Hi Elaine,
As posed, your question is rather difficult to respond to properly.
I'd imagine the answer is the predict() function, but you'll probably
want to rephrase if that's not enough to get what you want. What
worries me is that I would be inclined to model your bird species as
categorical variables (or perhaps use mixed models) so I'm not sure
it's valid to extrapolate to different species.
As far as asking questions in a technical forum goes, here are two
helpful general links:
www.catb.org/esr/faqs/smart-questions.html
http://mattgemmell.com/2008/12/08/what-have-you-tried/
and some R specific advice here:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Cheers,
Michael
On Sun, Aug 26, 2012 at 9:33 PM, Elaine Kuo <elaine.kuo.tw at gmail.com> wrote:
> Hello,
>
> I have weight and wing length data of 5 kinds of birds (B1 to B5).
> Weight data (predictor) and wing data (response) were used to generated a
> simple regression.
> (using lm)
>
> Now some weight data are found but without wing data (B6, B7).
> I want to use the generated simple regression to produce wing data of B6
> and B7 by their weight data.
> Please kindly advise R code to carry it out.
> Thank you.
>
> Elaine
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list