Week 1: OLS, Dummies, model adequacy, assumptions and inference/testing
Dummies: In STATA, suppose you want to create a level/slope dummy with a reference category for
different continents you can easily use the code: xi i.continent (where continent contains the
different continens) to create a level dummy and we can use the code: xi i.continent*variable to
create a slope dummy for the continent with another variable.
Week 2: Panel data
Long vs wide format: In STATA the long format for panel data is when the time observations go from
top to bottom and the variable observations from left to right, while the wide format has all variables
with their time observation from left to right. For convenience purposes we need to reshape the data
from wide to long format.
With the code bysort you can sort on time or entity to perform transformations in the data, such that
you can calculate the mean of a variable per observation, or per time period.
Fixed effects: When you do a regression in state with panel data you first need to show stata you
have panel data with xtset and the corresponding identity indicator and time indicator. Additionally,
if you do a panel data regression with fixed firm effects, if there are variables included in the
regression which do not variate per entity (think of, for example a dummy variable), they will
automatically drop out due to collinearity issues. The STATA output of a fixed effects regression is
shown below, it is such that you cannot interpret the R-squared of the between and overall part, only
that of the within R-squared. Additionally, at the bottom there is output of an F-test, this F-test tests
if the dummies utilized for the fixed effects are actually significant, such that we know if we need the
fixed effects model or could have just done a pooled regression. The sigma u at the bottom give the
standard deviation of the fixed effects. The sigma e gives the standard deviation of the root mean
squared error. The rho gives the fraction of the variance which is due to the fixed effects (this thus
shows how much variation actually comes from within each entity).
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Elmar1999. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.21. You're not tied to anything after your purchase.