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?
Catplot Label CustomizationHello! I have three questions when using catplot. 1) Labels (designated as the supaxis) were trunc…
Error r(198)-- "option bwcheck() not allowed" displays when attempting to use the rdsampsi commandI'm trying to find the sample size for an MDES for a regression discontinuity analysis, and I stumbl…
generating N dummies for each value in variableGood morning, I need to generate a categorical variable for each of these entries: Code: numb…
Panel data: per country charts in one single graphDear all, I am struggling a bit to reproduce a panel data chart. Let's say that I have three variab…
Finding whether value of one string variable appear in anotherHi, With the dataset similar to the one listed below, I am trying to find whether main_var contains…
Subscribe to:
Post Comments (Atom)
0 Response to aweight, pweight or fweight? What to use for WLS?
Post a Comment