search for: regressionresult

Displaying 2 results from an estimated 2 matches for "regressionresult".

Did you mean: regressionresults
2011 Sep 19
1
regression summary results pvalues and coefficients into a excel
Hi All, I have run many regression analyses (14000 +) and want to collect the coefficients and pvalues into an excel file. I can get the statements below to work up to step 4. I can printout the regressionresults (sample output below). So my hope is to run something like step 5 and 6 and put the pvalues (and then coefficients) into an excel file. Can anyone suggest what I am doing wrong or a better way :0 Thanks Don 1) sdata <- read.table("gene.csv", row.names=1, sep=',') 2)...
2012 Feb 23
1
Improving performance of split-apply problem
...ervations, then I need to add rows to get to 40, populating all variables with 0's for those extra rows. Here's the function I wrote to do this: get_MSE = function(x) { rownames(x) = x$ID #'ID' can take on any value from 1 to 40. x = x[as.character(1:40), ] x[is.na(x)] = 0 regressionResult = lm(A ~ B + C + D + E, data=x) #A-E are some variables in the data frame. MSE = mean((regressionResult$fitted.values - A)^2) return(MSE) } library(plyr) output = ddply(dataset, list(dataset$group1, dataset$group2), get_MSE) The above code takes about 10 minutes to run, but I'd really ne...