[R] Function input for regression analysis

flokke flokke at live.de
Mon Oct 31 13:13:05 CET 2011


Dear all,
I have a small question.
I would like to write a function for a regression analysis that an be
applied to every dataset.
Now my problem is that I do not know what I have to implement then as input
for the function

mytest <- function (x,y) {
                                    beta <- solve(t(x)%*%x%*%t(x)%*%y

                                    (....)
                                   }

would not make any sense, because then you could only use a dataset with y
and one predictor,
but I just dont know how to do this in another way.

Has someone any idea?

Thanks a lot!
Cheers, Maria

--
View this message in context: http://r.789695.n4.nabble.com/Function-input-for-regression-analysis-tp3955611p3955611.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list