Dear all,
I would like to apply a weighted least squares model but I do not know which weight to use for my problem. I am following the methodology of a published paper. The authors state: "We use weighted least squares, weighting each firm by the inverse of the number of firms in that country-quarter. This is to avoid giving excessive weight to countries in our sample that have a greater fraction of the number of firms such as the U.S.".
Now, I use the following code to get the number of distinct firms and after that to do my regression analysis:
egen tag = tag(firmid domicile_id qdate)
egen distinct = total(tag), by(domicile_id qdate)
gen weight = 1/distinct
reghdfe y x [pweight=weight], vce(cluster firmid)
Is it pweight, aweight or fweight to use in this context? Is it correct to use my variable "weight", or do I have to use the variable "distinct" in the square brackets?
Thank you very much in advance and best wishes,
Simon
Related Posts with aweight, pweight or fweight? What to use for WLS?
Jeff Wooldridge teaching Causal Inference and DiD methods in StataHi everyone In case you're interested, Jeff Wooldridge is offering two Instats seminars on Causal I…
Measuring HHI for datasets with lots of observationsHello everyone I am a thesis student from Belgium working on my thesis about labour market concentr…
Maximum number of values for a categorical variable.What is the maximum number of values for a categorical variable for a chi-square test? For example, …
Comparing observation value of VAR with values of VAR across all observationsI'm analyzing the association between a public policy of interest and various indicators of job qual…
Grouping by days and timeHi. I have data on hospital visits for the period of Oct 1, 2022 - Feb 28, 2023. The visits have the…
Subscribe to:
Post Comments (Atom)
0 Response to aweight, pweight or fweight? What to use for WLS?
Post a Comment