Howdee,
Would anyone be kind enough to tell how I can apply the function lm() to each level of a given factor so to obtain the intercept and slope for each factor level within a matrix?
For instance, suppose a dataframe containing 3 variables: id, x and y.
I want to compute the function lm() for each level contained in id, as lmList would do...
Thanks for your time,
Marc
Tél: +1-819-821-8000 poste 61313
Fax: +1-819-821-8049
Courriél: Marc.M.Belisle_at_USherbrooke.ca
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.
Archive generated by hypermail 2.2.0, at Fri 15 Feb 2008 - 21:30:14 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.