I am working with a very unbalanced panel data set, where my id variable is an individual, and the time variable is quarters. I am currently trying to run separate regressions for each individual in my panel, using Newey-West standard errors to control for what I know to be serial correlation in my data. When I read in the data, I --xtset-- my data as well as use --tsfill, full--. My code looks like the following:
Code:
levelsof person, local(levels) foreach l of local levels { newey2 depvar mean_depvar if person == `l', force lag(4) }
Code:
yq is not regularly spaced -- use the force option to override
newey2 handles missing observations differently for time series and panel data sets. Consider the example of a time series data set containing gaps, which is then recast using tsset as a panel data set with one group. newey and newey2 will not run on the time series version without force; with force they treat available observations as equally spaced. After the set is cast as a panel, newey2 will run without , force, and will assume zero serial correlation with missing observations.
Is the reason that I cannot run --newey2-- without --force-- is because now I am running separate regressions, which are essentially using unbalanced time-series for each individual? Any thoughts or guidance on this would be much appreciated!
0 Response to newey2 with force
Post a Comment