Kristi,

It's a little unclear what exactly you're trying to do.  However, I 
recently wanted to run a series of ANOVAs in a for loop and found this R 
Help thread useful:
http://tolstoy.newcastle.edu.au/R/e6/help/09/01/2679.html

I also found Chapter 6 of the following book helpful:
Zuur, A. F., E. N. Ieno, N. J. Walker, A. A. Saveliev, and G. M. Smith. 
2009. Mixed Effects Models and Extensions in Ecology With R. Springer.

If you need more help, I'd suggest sending some sample data and what 
code you've written so far with specifics about the problems you're having.

Hope that helps,
Adam


On 4/24/2012 8:17 AM, Kristi Glover wrote:
> Hi everyone, I am writing this to get  your help. I have a big data set and I 
> wanted to do multiple regression and repeat this process several timesfor 
> example (data)where y: dependent variables ; number of columns are 5, nrow = 
> 1800y   temp, preci, growing season days, max temp, min temp region4   23     
> 0        127                             35           14         NORTH AMER10 
>  35    21       120                             32          17         NORTH 
> AMER1   18     1        90                               27            12     
>    EUROPE...........
> 1) here I wanted to do linear regression (simple regression) using each 
> predictor (temp, preci, growing season days, max temp... etc), 
> separatelyafter that, I want to  second  quadratic regression using each 
> predictor, and third - polynomial (cubic)2) I wanted to compare the models 
> (linear, quadratic and cubic) and chose the best model 3) I wanted to do 
> multiple regression using the best model of each variable Further, I wanted 
> to divide the data into groups by region. and, then perform the above 
> analysis for each group (by region)and, I wanted to compare the residuals 
> between the models where I have been using all data set and the models by 
> region
> I was trying to do manually, but it is taking so much time. I think it is not 
> difficult and does not take time to write script in R.  I was trying to make 
> loop but I could not succeedI would be very grateful if you help me how I can 
> write script (loop function) and compute the analysis in R. Thanks for your 
> support.
> Sincerely,
> Kristi GloverUniversity of Windsor, Windsor, Canada
>
>
>                                       
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.

-- 
Adam Zeilinger
Post Doctoral Scholar
Department of Entomology
University of California Riverside
www.linkedin.com/in/adamzeilinger


        [[alternative HTML version deleted]]

______________________________________________
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