On Jun 19, 2009, at 9:00 AM, onyourmark wrote:


I am trying to build a glm model with many inputs.
I saw the following code in Rattle
crs$glm <- glm(value ~ ., data=crs$dataset[,c(1:59,922)],
family=binomial(link="logit"))

I am not clear about what

value ~ .

Generally the "." in a formula indicates all of the remaining variables without interactions.

?"formula" # although I did not find that particular convention documented in a cursory review of that page .


means and also, I see

data=crs$dataset[,c(1:59,922)]

I have read that the data argument is optional here
"an optional data frame, list or environment (or object coercible by
as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically
the environment from which glm is called"

when they say "data", is that meant to include the dependent variable as
well.

Yes.

In other words,
in the above statement 'value' is the dependent variable and it is also
column 922 in the data set.
Is this correct?

Yes.

correct
Thank you.

--


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to