this vid just saved me. thank you so much, your explanation is so easy to follow, was never even told you could just paste the data code instead of downloading all 40 different data.(still crying though). again thank you Mike.
Great video! I think k in the statistical table represents the explanatory variable (excluding the constant), hence in the example you were using, it is just 1.
Amazing professor just have one comment could after uploading any tutorial include in the video description just the links for other tutorials if mentions in the uploded video? Which will ease finding the exact videos
Hi Mike! I have cross sectional loan data. I want to test the impact of a unique independent variable X on interest rate. I will control for loan characteristics and borrower characteristics. I also want to control for macroeconomic variables such as unemployment, bond yield etc. my macroeconomic variables are monthly data. Should I use the same test as you used here to test autocorrelation for OLS?
Hi - Great Question! The 'xtregar' command will let you run FE or RE with an autocorrelated idiosyncratic disturbance term (www.stata.com/manuals13/xtxtregar.pdf). For panel autocorrelation due to the time-invariant error, FE, RE or cluster robust SE will handle that.
You first need to create a variable that tracks each observation over time, the easiest of which is 'trend' = 1,2,3, ...etc. try this: 'gen trend=_n'; tsset trend'. Then the commands will work.
I just liked this tutorial - Great! At the same time, I was wondering if you could recommend a test for autocorrelation in case of cross-sectional data. Specifically, I surveyed employees from one industry - namely the IT sector. Furthermore, I do not analyse geographical data.
Hi - glad you found the video helpful! It sounds like you might want to investigate "cluster-robust" standard errors for your cross sectional data. This will correct for cases of error correlated across employees in the same sector or region. In stata: reg y x,vce(cluster id). [where id is your sector variable]
Fantastic work. hats off. Sir, I have a panel data, T=41, N=16 (T>N). Dear Prof. When I run "estat dwatson" in Stata, It gives me this error "sample may not include multiple panels" Please help me to solve it.
The Durbin-Watson test is valid only for pure time series, and does not handle autocorrelation within panel data. There is a command "xtserial" that should work for you, although I do not have a tutorial for it.
UNRATE is the code for US unemployment rate used by the Federal Reserve Economic Database. Use these commands to acquire the data series from within Stata: 'ssc install freduse'; 'freduse UNRATE'
this vid just saved me. thank you so much, your explanation is so easy to follow, was never even told you could just paste the data code instead of downloading all 40 different data.(still crying though). again thank you Mike.
I´m from Ecuador and this video just saved me!!!! THANK YOU
You've saved my life and my degree, in that order
Thanks Mike. Great job.
Thanks man i've been struggling with Stata for a while
Glad it was helpful!
Great video! I think k in the statistical table represents the explanatory variable (excluding the constant), hence in the example you were using, it is just 1.
Great explanation! Best Regards from Buenos Aires
Thank you!
Hi, do you know how I can test for autocorrelation in a panel data with 2Ts?
Amazing professor just have one comment could after uploading any tutorial include in the video description just the links for other tutorials if mentions in the uploded video? Which will ease finding the exact videos
Hi Mike! I have cross sectional loan data. I want to test the impact of a unique independent variable X on interest rate. I will control for loan characteristics and borrower characteristics. I also want to control for macroeconomic variables such as unemployment, bond yield etc. my macroeconomic variables are monthly data. Should I use the same test as you used here to test autocorrelation for OLS?
Can you share the dataset?
When i was trying regress uhat on 1.uhat some error occurred.
uhat: factor variables may not contain noninteger values
r(452);
Ahh, the lag operator is the letter “L”, which looks just like a “one” in the stata font. Use “reg uhat L.uhat”.
A very common mistake!
@@mikejonaseconometrics1886 Thank you sir .
Hi mike. How do I know whether to use xtreg or xtregar for fixed effects ??
what about autocorelation in panel data ?
Hi - Great Question! The 'xtregar' command will let you run FE or RE with an autocorrelated idiosyncratic disturbance term (www.stata.com/manuals13/xtxtregar.pdf). For panel autocorrelation due to the time-invariant error, FE, RE or cluster robust SE will handle that.
thank you
very welcome!
An error comes up after the demand "tsline..." saying "time variable not set, use tsset varname...". What does that mean? The return code is 111.
You first need to create a variable that tracks each observation over time, the easiest of which is 'trend' = 1,2,3, ...etc. try this: 'gen trend=_n'; tsset trend'. Then the commands will work.
@@mikejonaseconometrics1886 Thank you! It worked!
I just liked this tutorial - Great! At the same time, I was wondering if you could recommend a test for autocorrelation in case of cross-sectional data. Specifically, I surveyed employees from one industry - namely the IT sector. Furthermore, I do not analyse
geographical data.
Hi - glad you found the video helpful! It sounds like you might want to investigate "cluster-robust" standard errors for your cross sectional data. This will correct for cases of error correlated across employees in the same sector or region. In stata: reg y x,vce(cluster id). [where id is your sector variable]
Thanks so much for asking this question!
@@mikejonaseconometrics1886 Super clear, Professor!
really helpful video
Fantastic work. hats off.
Sir, I have a panel data, T=41, N=16 (T>N).
Dear Prof. When I run "estat dwatson" in Stata, It gives me this error "sample may not include multiple panels"
Please help me to solve it.
The Durbin-Watson test is valid only for pure time series, and does not handle autocorrelation within panel data. There is a command "xtserial" that should work for you, although I do not have a tutorial for it.
Mike Jonas Econometrics thank you dear Prof
excuse me ‘teacher, can i ask for UNRATE what’s it and what command for creating
UNRATE is the code for US unemployment rate used by the Federal Reserve Economic Database. Use these commands to acquire the data series from within Stata: 'ssc install freduse'; 'freduse UNRATE'
Thank you :)
You're welcome!
i love you
13:20