Mr_Pag
October 29th, 2009, 12:03 AM
Hi all,
I am trying to fit a model via the glm function in R. I am wondering if R will differentiate between categorical and continuous (covariate) variables, or will I need to specify either in the model. From the in-built help it appears neither and I had a quick rake through the R archives to no avail.
From what I gather, in SAS you typically specify the categoricals, whereas in Minitab it is the covariates. e.g.
## MTB Code
GLM "Y" = X1 X2;
Covariates 'X3';
Brief 3.
## SAS Code
proc glm;
class X1 X2;
model Y= X1 X2 X3/p solution;
# Note: May not provide equivalent functionality
How are these stipulated in R, is glm the right tool for the job or should I be investigating ANCOVA functions or another library function? Many thanks in advance!
Kind regards,
Pag
I am trying to fit a model via the glm function in R. I am wondering if R will differentiate between categorical and continuous (covariate) variables, or will I need to specify either in the model. From the in-built help it appears neither and I had a quick rake through the R archives to no avail.
From what I gather, in SAS you typically specify the categoricals, whereas in Minitab it is the covariates. e.g.
## MTB Code
GLM "Y" = X1 X2;
Covariates 'X3';
Brief 3.
## SAS Code
proc glm;
class X1 X2;
model Y= X1 X2 X3/p solution;
# Note: May not provide equivalent functionality
How are these stipulated in R, is glm the right tool for the job or should I be investigating ANCOVA functions or another library function? Many thanks in advance!
Kind regards,
Pag