66 5000 10000 30 40 mileage mpg price fitted values

This preview shows page 66 - 72 out of 72 pages.

66
Image of page 66

Subscribe to view the full document.

0 5,000 10,000 15,000 10 20 30 40 Mileage (mpg) Price Fitted values 0 5000 10000 15000 .02 .04 .06 .08 Gallons per mile lowess price gpm Price Some exploratory aspects of auto.dta 67
Image of page 67
Now let us walk though some analysis of nontrivial Stata datasets. A list of over 100 datasets suitable for instructional use is avail- able on the economics web pages as Let’s consider the data Zvi Griliches used in his 1976 article on the wages of young men ( Journal of Political Economy , 84, S69- S85). These are cross-sectional data on 758 individuals collected over several survey years. do 68
Image of page 68

Subscribe to view the full document.

* StataIntro: cross-section example log using intro1, replace use describe summarize label define ur 0 rural 1 urban label values smsa ur tab smsa tab mrt smsa, chi2 ttest med,by(smsa) anova lw mrt smsa anova lw mrt smsa mrt*smsa anova,regress regress lw tenure kww smsa predict lweps,resid 69
Image of page 69
scatter lweps kww bysort year: regress lw tenure kww smsa graph matrix iq kww age s expr lw, msize(tiny) gen medrural = med*(smsa==0) gen medurban = med*(smsa==1) regress lw tenure kww medurban medrural test medurban=medrural log close
Image of page 70

Subscribe to view the full document.

The following example reads some daily Dow-Jones Averages data, graphs daily returns, then performs Dickey-Fuller tests for unit roots on the DJIA, its log, and its returns (log price rel- atives), and on their first differences. AR(3) models are then estimated on the series, and the Box–Pierce portmanteau test is then performed on the residuals. In this example, we make use of “local macros” (with values ‘v’ ), which enable us to perform the same operations on several named variables without having to write out the commands for each variable. This facility may be used with varlists of any length, and makes it very easy to generate parallel analyses, produce graphs, etc. for an arbitrary set of variables or time periods. do 70
Image of page 71
* StataIntro: time-series example log using intro2,replace use desc summ tsset tsline ret foreach v of varlist djia ldjia ret { dfgls ‘v’, maxlag(12) dfgls D.‘v’, maxlag(12) regress ‘v’ L(1/3).‘v’, robust predict eps_‘v’,resid wntestq eps_‘v’ } log close 71
Image of page 72

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern