1

I am new to R for regression analysis. I am trying to use feols to do the analysis but I am wondering if feols has weighting options which are equivalent to Stata weighting like aweight, pweight. Particularly, I am looking for a weighting option that could weight observations by the population of the county where it locates. Thank you!

Austin
  • 11
  • 1

1 Answers1

2

you can simply use the weights function. For example:

m1<-  feols(y ~ x1| x2 + x3,
                         data = df,
                         vcov_cluster(~x2 + x3),
                    weights = ~x4)

Hope that helps.

anrisakaki96
  • 193
  • 8