data -> data matrix that can be used in regressions
--- Ulrich Kaiser <uka at sam.sdu.dk> wrote:
Dear R users,
I have spent most of this day figuring out how to read STATA data into R (which eventually worked) and to run a simple OLS regression. It seems that the manuals are written in the most general and abstract way which does not really make it easy to understand what's going on. I'd be glad if somebody could save my day by: telling me how to define a matrix from the variables I read into R's memory, supposing that the variable are "lkiosk" and "lvisits".
Mymatrix <- cbind(lkiosk,lvisits) Do a class(Mymatrix) to check this. You might find a simple tutorial like http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html to be of help. I certainly have.