I'm trying to run f-tests on groups of dummies included in my regression, but I can't seem to solve the 'aliased coefficients' problem?

My regression looks like this:

Predictors <- c("lage", "llen", "lwid", paste0("me", 1:19), paste0("art", 1:302), paste0("hal", 2:25))
MLR_Formula <- as.formula(paste("lprice ~", paste(Predictors, collapse = " + ")))
Hedonic_Regression <- lm(MLR_Formula, data = Contemporary_Art_Dataset, subset = sold == 1)

Now I'm trying to run some f-tests on the groups of dummies (me, art and hal), but there is always an 'aliased coefficients' error:

library(car)
linearHypothesis(Hedonic_Regression, paste0("me", 1:19, " = 0"))

Fehler in linearHypothesis.lm(Hedonic_Regression, paste0("me", 1:19, " = 0")) : 
  there are aliased coefficients in the model.

I've tried multiple things to either identify the aliased coefficients or exclude them, but nothing has worked so far:

alias_info <- alias(Hedonic_Regression)  
print(alias_info) 

should show aliased coefficients, however, there seem to exist none

should show linear combinations between multiple predictors, however, there seem to exist none

library(car)
NA_arts <- c( "art1", "art11", "art26", "art50", "art54", "art59", "art61", "art92", "art101", "art127", "art142", "art154", "art164", "art168", "art192", "art210", "art218", "art257", "art272", "art294")
all_arts <- paste0("art", 1:302)
valid_arts <- setdiff(all_arts, NA_arts)
hypotheses <- paste0(valid_arts, " = 0")
linearHypothesis(Hedonic_Regression, hypotheses)

manually excluded all dummies that are NA (e.g. bc they aren't included in the subset), didn't change the error message

  1. manually excluded one reference dummy, didn't change the error message either

For your help I'm very grateful :))

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.