Tedext

Data imports in STATA and how to run regressions

I expect the paper be around 2500 words or 10 pages approximatively

Introduction

Describe the motivation of this study and briefly mention related literatures and overview of your findings.

Literatures (if possible)

Discuss similar or literatures that are related with your study.  You can use google scholar to find it. 

Data

Describe the data.  Where you downloaded and what are the variables you are going to use.  Include the summary statistics. Here is the simple stata code.

Use "outreg2 using summary.doc, replace sum(log) keep(variables you want to add)" then stata will give you summary statistics.

Using the summary statistics, briefly describe the data and what are the mean looks like.  For example, if you make Black dummy and the mean is 0.10.  This means out of 100 of your observation, Black is 10%. 

Model

Briefly mention your model.  If you use OLS, you would put like y=b0+b1x1+b2x2 + e something like that you learn in class.  If you use instrument variable, then write first and second stage.  If you use probit or logit model, then use like Prob(y=1|x)=CDF(xb).  Like that. Then using this model you run stata.

Results

 Using the regression results you did in stata, use the code I sent you last time "outreg2 using regression.doc,replace ctitle(Y)."  This will give you nice looking table.  Using this table, you can discuss your finding in results section.  Without graph, usually 2 pages are in results section.

Conclusion/discussion

Talks about what you have found.  What are the limitations.  Is there omitted variable bias?  What are the future research.

Lastly, put reference.  Make sure you cite what you cite in reference section. 

Inserting Table

When you present and write a paper, please do not copy and paste the regression results from stata.  When you search an economic article, they have very nice looking tables.  Try to make like that table using word or excel.

Another way you can do is use command "outreg2".  This is a stata command that you can export the regression results into nice looking table.

you can type in stata "ssc install outreg2"  This command is ordering stata to install "outreg2"

After installing, you first run the regression then type "outreg2 using filename.doc, replace ctitle(your dependent variable).

The example is following.

reg lnq lnp lnx1, robust

outreg2 using q3.doc, replace ctitle(lnq)

If you do not want to use this command, you can always do your own table.  But do not copy the stata regressions.

STATA

Data imports in STATA and how to run regressions.

You have three options in general.  I guess most data sets are in excel file. 

You can click on File > Import >  Excel spreadsheet

You can also  use "insheet" stata command to bring your excel data into the stata program.  Type "help insheet" in the stata command, it will give you detail description.  Third way which is very easy is copy the data in excel and paste in stata program.  First open the stata program then click "data editor" on the left top of stata program, then paste the copied data from excel.  Then save it for future uses.

The most basic regression starts with OLS (stata code == "reg").  If you want to use non linear model, probit or logit model will be ok.  If you suspect endogeneity in your regressors (x), then instrument variable approach is appropriate.  But I understand for the term project, IV might be hard.  But for those who want to develop your regression further, I am happy to help you.  

As long as your analysis is consistent with your OLS regression and you mention possible omitted variable problems (with potential variables), I believe it may be fine.

Data imports in STATA and how to run regressions

  • Order

  • Payment

  • Processing

  • Delivery

Validation error occured. Please enter the fields and submit it again.
Thank You ! Your email has been delivered.