0

I am trying to run clustered standard errors but I get the error: Error in model.matrix(x) : object 'model' not found.

The code is as follows:

reg1c <- felm(ethnic_fav ~ post + post_victory + male + age + age_sq + unemployed + rural + education | country_match_fe + language_year_id + dayweek + month + day | 0, data=dataset)

vcov <- cluster.vcov(reg1c, ~ country_year_fe)

At which point I get the error code. Do you know what I might be missing?

one
  • 3,121
  • 1
  • 4
  • 24
  • 5
    Welcome to SO, Luisa Cerca! Questions on SO (especially in R) do much better if they are reproducible and self-contained. By that I mean including attempted code (you'd mostly done this, please be explicit about non-base packages), sample representative data (perhaps via `dput(head(x))` or building data programmatically (e.g., `data.frame(...)`), possibly stochastically), perhaps actual output (with verbatim errors/warnings) versus intended output. Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans Apr 26 '23 at 14:03

0 Answers0