0

I have tried to add robust standard errors to the following model, but it doesn't seem to work, and gives the error below, what am I doing wrong?

Model <- tslm(Pris.pr.m2 ~ 
                           Lang.rente + Kort.rente + Forbrugerprisindeks + 
                           Ledighed + Disponible.indkomst, 
              data = as.ts(Prisudvikling.data2))

coeftest(Model, vcov = vcovHC(Model, type = 'HC0'))
Error in rowMeans(ef/X, na.rm = TRUE) : 
  'x' must be an array of at least two dimensions

I have tried several functions for robust standard errors, but none of them seem to work unless I use the lm() function instead

M--
  • 25,431
  • 8
  • 61
  • 93
  • 1
    Welcome to Stack Overflow! You need to provide a [minimal, reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) of your data. Taking the [Tour](https://stackoverflow.com/tour) and reading [How to Ask](https://stackoverflow.com/help/how-to-ask) can be helpful as well. – M-- Apr 13 '23 at 14:26
  • Please provide enough code so others can better understand or reproduce the problem. – Community Apr 14 '23 at 10:30

0 Answers0