Displaying 1 result from an estimated 1 matches for "datainterim".
2008 Apr 29
2
Running regression (lm, lrm) 100+ times and saving the results as matrix
...but I need
to know how I would combine the regression results together into a matrix
possibly.
Thank you!
Mike
-------------------------------
m = max(data$TIME)
# define regmatrix
for(i in 1:m){
g=runreg(data, i)
# attach g to regmatrix
}
runreg = function(data, index){
datainterim = subset(data, TIME==index)
g = lrm(X ~ A + B, datainterim)
return(g)
}
[[alternative HTML version deleted]]