Skip to main content
added 214 characters in body
Source Link
Poul
  • 69
  • 1
  • 8

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)  # augmented model

Is R only doing an omnibus test and comparing my augmented model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)  # compact model

or is it doing multiple single-degree-of-freedom tests, such as comparing:

model = lm(x ~ a + b + c, data=mydata) # augmented model

to all of the following compact models:

null1=lm(x ~ b + c, data=mydata) # compact model1
null2=lm(x ~ a + c, data=mydata) # compact model2
null3=lm(x ~ a + b, data=mydata) # compact model3

I am worried because I was taught to compare models with only a single degree of freedom between them, ie an augmented model that includes the parameter of interest against a compact model that excludes the parameter of interest. So, if I was interested in the effect of a, then I was taught to compare the augmented model with the compact model as follows:

model = lm(x ~ a + b + c, data=mydata) #augmented model
null = lm(x ~ b + c, data=mydata)      #compact model
anova(null, model)                    # single degree-of-freedom comparison between augmented model and compact model.

But this latter approach isn't very often taught, particularly when one is using R, though Bodo Winter seems to be an exception [EDIT: I've realised that the Winter tutorial is for random effects using lmer(), which does not automatically produce a p value, so this would explain why he teaches the model comparison approach in that context]. Is there any point in doing the comparison?

In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)  # augmented model

Is R only doing an omnibus test and comparing my augmented model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)  # compact model

or is it doing multiple single-degree-of-freedom tests, such as comparing:

model = lm(x ~ a + b + c, data=mydata) # augmented model

to all of the following compact models:

null1=lm(x ~ b + c, data=mydata) # compact model1
null2=lm(x ~ a + c, data=mydata) # compact model2
null3=lm(x ~ a + b, data=mydata) # compact model3

I am worried because I was taught to compare models with only a single degree of freedom between them, ie an augmented model that includes the parameter of interest against a compact model that excludes the parameter of interest. So, if I was interested in the effect of a, then I was taught to compare the augmented model with the compact model as follows:

model = lm(x ~ a + b + c, data=mydata) #augmented model
null = lm(x ~ b + c, data=mydata)      #compact model
anova(null, model)                    # single degree-of-freedom comparison between augmented model and compact model.

But this latter approach isn't very often taught, particularly when one is using R, though Bodo Winter seems to be an exception. Is there any point in doing the comparison?

In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)  # augmented model

Is R only doing an omnibus test and comparing my augmented model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)  # compact model

or is it doing multiple single-degree-of-freedom tests, such as comparing:

model = lm(x ~ a + b + c, data=mydata) # augmented model

to all of the following compact models:

null1=lm(x ~ b + c, data=mydata) # compact model1
null2=lm(x ~ a + c, data=mydata) # compact model2
null3=lm(x ~ a + b, data=mydata) # compact model3

I am worried because I was taught to compare models with only a single degree of freedom between them, ie an augmented model that includes the parameter of interest against a compact model that excludes the parameter of interest. So, if I was interested in the effect of a, then I was taught to compare the augmented model with the compact model as follows:

model = lm(x ~ a + b + c, data=mydata) #augmented model
null = lm(x ~ b + c, data=mydata)      #compact model
anova(null, model)                    # single degree-of-freedom comparison between augmented model and compact model.

But this latter approach isn't very often taught, particularly when one is using R, though Bodo Winter seems to be an exception [EDIT: I've realised that the Winter tutorial is for random effects using lmer(), which does not automatically produce a p value, so this would explain why he teaches the model comparison approach in that context]. Is there any point in doing the comparison?

In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

Post Reopened by whuber
Provided further details.
Source Link
Poul
  • 69
  • 1
  • 8

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)  # augmented model

Is R only doing an omnibus test and comparing my augmented model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)  # compact model

or is it doing multiple single-degree-of-freedom tests, such as comparing:

null1=lm(x ~ b +model c,= data=mydata)
null2=lmlm(x ~ a + b + c, data=mydata)
null3=lm(x ~ a +# b,augmented data=mydata)model

to all of the following compact models:

null1=lm(x ~ b + c, data=mydata) # compact model1
null2=lm(x ~ a + c, data=mydata) # compact model2
null3=lm(x ~ a + b, data=mydata) # compact model3

I am worried because I was taught to compare models with only a single degree of freedom between them, ie an augmented model that includes the parameter of interest against a compact model that excludes the parameter of interest. IfSo, if I am interestedwas interested in the effect of a, then I would dowas taught to compare the augmented model with the compact model as follows:

model = lm(x ~ a + b + c, data=mydata) #augmented model
null = lm(x ~ b + c, data=mydata)      #compact model
anova(null, model)                    # single degree-of-freedom comparison between augmented model and compact model.

But this latter approach isn't very often taught, particularly when one is using R, though Bodo Winter seems to be an exception. Is there any point in thisdoing the comparison? 

In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)

Is R comparing my model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)

or is it doing multiple single-degree-of-freedom tests, such as:

null1=lm(x ~ b + c, data=mydata)
null2=lm(x ~ a + c, data=mydata)
null3=lm(x ~ a + b, data=mydata)

I am worried because I was taught to compare models. If I am interested in the effect of a, then I would do:

model = lm(x ~ a + b + c, data=mydata)
null = lm(x ~ b + c, data=mydata)
anova(null, model)

But this latter approach isn't very often taught. Is there any point in this? In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)  # augmented model

Is R only doing an omnibus test and comparing my augmented model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)  # compact model

or is it doing multiple single-degree-of-freedom tests, such as comparing:

model = lm(x ~ a + b + c, data=mydata) # augmented model

to all of the following compact models:

null1=lm(x ~ b + c, data=mydata) # compact model1
null2=lm(x ~ a + c, data=mydata) # compact model2
null3=lm(x ~ a + b, data=mydata) # compact model3

I am worried because I was taught to compare models with only a single degree of freedom between them, ie an augmented model that includes the parameter of interest against a compact model that excludes the parameter of interest. So, if I was interested in the effect of a, then I was taught to compare the augmented model with the compact model as follows:

model = lm(x ~ a + b + c, data=mydata) #augmented model
null = lm(x ~ b + c, data=mydata)      #compact model
anova(null, model)                    # single degree-of-freedom comparison between augmented model and compact model.

But this latter approach isn't very often taught, particularly when one is using R, though Bodo Winter seems to be an exception. Is there any point in doing the comparison? 

In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

Post Closed as "Needs details or clarity" by Glen_b

I would like to know whether R produces single degrees of freedom tests for a formula. Ie,Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)

Ie, what is R doing in the above?

model = lm(x ~ a + b + c, data=mydata)

Is itR comparing my model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)

or

null=lm(x ~ 1, data=mydata)

or is it doing multiple single-degree-of-freedom tests, such as:

null1=lm(x ~ b + c, data=mydata)
null2=lm(x ~ a + c, data=mydata)
null3=lm(x ~ a + b, data=mydata)

I worry

null1=lm(x ~ b + c, data=mydata)
null2=lm(x ~ a + c, data=mydata)
null3=lm(x ~ a + b, data=mydata)

I am worried because I was taught to compare models, ie if I'm interested. If I am interested in the effect of a, then I would do:

model = lm(x ~ a + b + c, data=mydata)
null = lm(x ~ b + c, data=mydata)
anova(null, model)

model = lm(x ~ a + b + c, data=mydata)
null = lm(x ~ b + c, data=mydata)
anova(null, model)

But this latter approach isn't very often taught. Is there any point in itthis? In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

I would like to know whether R produces single degrees of freedom tests for a formula. Ie, in R:

model = lm(x ~ a + b + c, data=mydata)

Ie, what is R doing in the above? Is it comparing my model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)

or is it doing multiple single-degree-of-freedom tests, such as:

null1=lm(x ~ b + c, data=mydata)
null2=lm(x ~ a + c, data=mydata)
null3=lm(x ~ a + b, data=mydata)

I worry because I was taught to compare models, ie if I'm interested in the effect of a, then I would do:

model = lm(x ~ a + b + c, data=mydata)
null = lm(x ~ b + c, data=mydata)
anova(null, model)

But this latter approach isn't very often taught. Is there any point in it? In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:

model = lm(x ~ a + b + c, data=mydata)

Is R comparing my model to a null model with only an intercept:

null=lm(x ~ 1, data=mydata)

or is it doing multiple single-degree-of-freedom tests, such as:

null1=lm(x ~ b + c, data=mydata)
null2=lm(x ~ a + c, data=mydata)
null3=lm(x ~ a + b, data=mydata)

I am worried because I was taught to compare models. If I am interested in the effect of a, then I would do:

model = lm(x ~ a + b + c, data=mydata)
null = lm(x ~ b + c, data=mydata)
anova(null, model)

But this latter approach isn't very often taught. Is there any point in this? In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.

provided more details
Source Link
Poul
  • 69
  • 1
  • 8
Loading
Source Link
Poul
  • 69
  • 1
  • 8
Loading