[R] 2SLS with Fixed Effects and Control Variables
Kelis Wong
ke||@@whk @end|ng |rom gm@||@com
Sun Jan 28 18:18:40 CET 2024
Dear John Fox, Christian Kleiber, and Achim Zeileis,
I am attempting to run various independent variable parameters to assess
their suitability. Unfortunately, I hit a snag and couldn't get the tests
to run properly. When I used ivreg, I got an error message saying: "Error
in eval(predvars, data, env) : object 'WageInequality' not found."
Can you please help?
Model: numeric(WageInequality) = numeric(EffectiveMinimum) +
numeric(EffectiveMinimum2)
(whereas EffectiveMinimum2 is the quadratic form of EffectiveMinimum)
Instruments: numeric(`Log Real Minimum Wage`) + numeric(`Log Real Minimum
Wage2`) + numeric(IVinteration)
(whereas Real Minimum Wage2 is the quadratic form of Real Minimum Wage)
Time and Region Fixed Effects: factor(Region) + numeric(Year) + Region:Year
(whereas Region:Year is and interaction term of Region and Year)
Control Variables: factor(Region), numeric(`Woman Percentage`),
numeric(`Noneducated Percentage`)
Parameter 1:
ivreg(WageInequality ~ EffectiveMinimum + EffectiveMinimum2 + Region | `Log
Real Minimum Wage` + `Log Real Minimum Wage2` + IVinteration + Region,
dataset))
Parameter 2:
ivreg(WageInequality ~ EffectiveMinimum + EffectiveMinimum2 + Region + Year
+ Region:Year | `Log Real Minimum Wage` + `Log Real Minimum Wage2` +
IVinteration + Region + Year + Region:Year, dataset))
Parameter 3:
ivreg(WageInequality ~ EffectiveMinimum + EffectiveMinimum2 + Region + Year
+ Region:Year + `Woman Percentage` + `Noneducated Percentage` | `Log Real
Minimum Wage` + `Log Real Minimum Wage2` + IVinteration + Region + Year +
Region:Year + `Woman Percentage` + `Noneducated Percentage`, dataset))
--
Peace,
Kelis Wong
[[alternative HTML version deleted]]
More information about the R-help
mailing list