Hello,
I have spent considerable time trying to figure out that which I am about to describe.
This included searching Help, consulting my various R books, and trail and (always)
error. I have been assuming I would need to use a loop (looping over columns) but
perhaps and apply function would do the trick. I have unsuccessfully tried both.
A scaled down version of my situation is as follows:
I have a dataframe as follows:
ID Y x1 x2 x3 usergroup.
Y is a continous criterion, x1-x3 continous predictors, and usergroup is coded a 1, 2
or 3 to indicate user status.
My end goal is a (dataframe or matrix) with just the regression coef from each of 12
runs (each x regressed separately on Y for the total sample and for each usergroup).
I envision output as follows, a three column by four row dataframe or matrix.
Y and x1; Y and x2; Y and x3.
Total sample:
usergroup 1:
usergroup 2: (Regression Coefs fill the matrix)
usergroup 3:
Using 1.8.1
Windows 2000 and XP
Help would be most appreciated.
Greg Blevins, Partner
The Market Solutions Group
[[alternative HTML version deleted]]
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html