Dear Statalist users,
I am using the 'actest' command to conduct a serial correlation test after time-series regressions. However, I need to repeat the test 48 times (i.e., after each of the 48 regressions). So, I am trying to write a Stata code that generates the results automatically as follows:
matrix autocorr=J(48,7,.)
local i=1
forvalues j = 1/48 {
reg y x1 x2 x3 x4 if id==`j', robust
actest, r q0 lag(1/3)
matrix [`i',1]=(r(p))
i=`i'+1
}
matrix list autocorr
I get the message:
matrix operation not found
r(501);
I need help on how to fix the issue.
Thanks in advance for your reply.
Emna
Related Posts with Store p-values in a matrix after 'actest'
cmp for instrumental multinomial probit when there are many categoriesDependent variable Y1 has three categories 1, 2, 3 Dependent variable Y2 has four categories 1, 2, …
filling in missing observations?Here is part of my dataset, the same id means the same person, how to fill in missing values in name…
why i can't convert from yyyy/mm/dd to timehello i have variable for time like this : Day (variable name) 2011/12/01 2011/12/02 2011/12/03 . .…
svy, subpop, missing values1) Can someone point me to a resource that explains why the linearized S.E. and the logit transforme…
Unclear Seasonality & Strange Structural Break TestI'm getting odd results with time-series data and I'm trying to interpret them to find seasonality. …
Subscribe to:
Post Comments (Atom)
0 Response to Store p-values in a matrix after 'actest'
Post a Comment