Displaying 1 result from an estimated 1 matches for "a_109909".
Did you mean:
109909
2011 Apr 04
1
automating regression or correlations for many variables
Dear All,
I have a large data frame with 10 rows and 82 columns. I want to apply the
same function to all of the columns with a single command. e.g. zl <- lm
(snp$a_109909 ~ snp$lat) will fit a linear model to the values in lat and
a_109909. What I want to do is fit linear models for the values in each
column against lat. I tried doing zl <- (snp[,2:82] ~ snp$lat[,1]) but got
the following error message "Error in model.frame.default(formula = snp[,
2:82] ~ s...