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'
CS-ARDL Approach xtdcce2Hi All, Does the xtdcce2 stata command has limitation regarding, how many explanatory variables sho…
If increases in my x var cause increases in my y var does the opposite also hold true?I have survey data which records adult income and health across 4 waves. I would like to look at how…
Complex survey settingsHi, I am trying to set-up a complex survey data set in Stata and Mplus so that they have the same s…
wbopendata Multiple IndicatorsHi All, I am currently trying to download multiple indicators onto STATA from wbopendata, Currently…
Using growth rate as predictorDear Stata users, Thank you in advance for your kind response. I have a panel dataset of 30 countri…
Subscribe to:
Post Comments (Atom)
0 Response to Store p-values in a matrix after 'actest'
Post a Comment