Displaying 1 result from an estimated 1 matches for "dependent2".
Did you mean:
dependent
2011 Mar 15
1
Data Frame Variable Names
Hi,
I have created a dataframe (lets call is df) that contains the following
variables
"Dependent1" "Dependent2" Dependent3" "Independent1"
I want to do the following regressions:
z<- glm( df$Dependent1 ~ df$Independent1)
z<- glm( df$Dependent2 ~ df$Independent1)
z<- glm( df$Dependent3 ~ df$Independent1)
and so on
I wanted to put this in a for loop e.g.
for (i in 1:3) {
z...