TomDoan wrote:There's really no good way to modify @THRESHTEST, since it uses LM calculations to keep the computing time down. It would be easier to modify @MULTIPLEBREAKS. That does calculations based upon calculations of the regressions across each regime. Instead of keeping track of the sum of squared residuals for each interval:
compute intervalrss(s,e)=%rss
you would keep track of (minus the) subsample log likelihoods (since it's written to do a minimization rather than a maximization):
compute intervalrss(s,e)=%nobs=(e-s+1),+.5*%nobs*(log(%rss/%nobs)+1)
That will figure out the optimal regime breaks; you'll have to figure out how to adapt the output to handle the log likelihood
Hi Tom,
Since i want to perform the @THRESHTEST assuming heteroscedasticity and using one of the regressors as the threshold variable, i followed your advice and modified the procedure (attached). The output gives me RSS for 0 and 1 break, and according to BIC it finds one break to be the best (also, the break values output gives NA...not sure why).
In order to now adapt this result to get the Hansen test allowing for heteroscedastic errors, i believe i need to use the value i got for RSS from the @MULTIPLEBREAKS test (which is 0.756) so that in the @THRESHTEST procedure instead of having:
Code: Select all
* Convert everything to F statistics
*
compute sigma = (%rss-ssqmax)/(%nobs-2*%nreg)
compute fmax = (ssqmax/%nreg)/sigma
set ftests nb ne = (ssq/%nreg)/sigma
I would have something like:
Code: Select all
* Convert everything to F statistics
*
compute sigma = (0.756-ssqmax)/(%nobs-2*%nreg)
compute fmax = (ssqmax/%nreg)/sigma
set ftests nb ne = (ssq/%nreg)/sigma
This would then give me the corrected likelihood ratio. According to Hansen's paper the bootstrap technique under heteroscedastic errors also needs to be modified, could you please give some advice on how to do that?
I appreciate any help you can provide me with this!!
Many thanks!
Ana