Starting from:

$30

POLS6481-Assignment 6 Solved

Download the dataset SLEEP75.DTA which contains individual-level data collected for a study on sleep, which is the dependent variable, measured as the average number of minutes per week.

Run the following line of code to limit your study to the 515 married adults in the sample:

sleep <- read.dta("C:/Users/Scott/SLEEP75.DTA")

married <- subset(sleep, yrsmarr 0)

Recall that in Homework Assignment 5, you estimated the following regression model using ordinary least squares:

where  totwrk is average minutes worked per week, from 0 (unemployed) to 6415 (100+ hours);

age measures the respondent’s age;

agesq equals age2.

Now our attention is on three new variables:

female indicates whether the respondent is a woman;

yngkid indicates whether there is a child under 3-years-old in the house;

interaction is the product of female*yngkid;

Run the following two lines of code to create the female variable and the interaction term …
married$female = 1-married$male

married$interaction = married$female*married$yngkid

… then run a linear regression model with these six independent variables, and report your results:

Use your results from 1. to answer some additional questions about interaction terms involving two binary (qualitative) variables, female and yngkid.
What is the marginal effect of having a young kid on sleep? State it first as a literal equation, and then substitute numeric values based on the regression model.
=

=

What is the standard error of the marginal effect of having a young kid on sleep? Again, state it first as a literal equation, and then substitute numeric values from the regression model’s variance-covariance matrix of the estimators.
s.e.() =

=

What is the marginal effect of gender on sleep? State it first as a literal equation, and then substitute numeric values based on the regression model.
=

=

What is the standard error of the marginal effect of gender on sleep? Again, state it first as a literal equation, and then substitute numeric values from the regression model’s variance-covariance matrix of the estimators.
s.e.() =

=

Set age = 35, set agesq = 1225, and set totwrk = 2112; calculate the predicted sleep per week for…
(i) a male without a young child                                 minutes

(ii) a male with a young child                                      minutes

(iii) a female without a young child                           minutes

(iv) a female with a young child                                 minutes

For a man, how does having a young child impact sleep? Use the values in e. to calculate the difference in predicted sleep.
Is this effect statistically significant? Use your answer to b. to calculate the standard error of the marginal effect and t statistic.
For a woman, how does having a young child impact sleep? Use the values in e. to calculate the difference in predicted sleep.
Is this effect statistically significant? Use your answer to b. to calculate the standard error of the marginal effect and t statistic.
Check your answers to g. and i. using the trick I taught in class, changing the baseline group from males to females. You will need to replace the variable female with the variable male and run the following line of code to create an interaction between male and yngkid:
married$interaction_m = married$male*married$yngkid

 

 

Download the dataset TradeConflictK12.dta which contains dyadic data collected for a study on tradeijt, which is the dependent variable, measured as the natural log of trade in constant 1992 dollars in a specific year (t) between a specific pair of countries (i & j). The dataset covers 76 countries for the years 1961 to 1992. The data were collected by Scott Kastner for his 2007 article, “When Do Conflicting Political Relations Affect International Trade?” Journal of Conflict Resolution 51: 664-688.

Kastner argues that the level of trade depends on conflicting interests between countries and the strength of domestic actors who benefit from trade. Kastner cannot measure this latter variable directly, so he uses the extent of trade barriers as a proxy variable that is inversely related to the strength of pro-internationalist domestic actors.

Kastner’s theoretical argument is fundamentally interactive: he contends that while higher levels of conflict reduce trade, this effect is greatest when there are many trade barriers (indicating weak pro-internationalist interests). He estimates the following model:

where  conflict measures the degree of dissimilarity between the two countries’ voting patterns in the United Nations; its range is from 0 to 1.1, with an average of 0.37

trade barriers measures policy distortions to international trade, from fixed effects estimated by Hiscox and Kastner (2002); its range is from 0.96 to 4.12 with an average of 3.42

interaction is the product of conflict*trade barriers; its range is from 0 to 4.27, with an average of 1.26.

For controls, you will use four variables:

laglnrtrade is the lagged dependent variable

lnrgdpab is the natural log of the product of gross domestic products of the two countries

lndist is the natural log of the distance between the two countries

landlocked counts the number of countries in a dyad (0, 1, 2) that are land-locked

Estimate the regression model and report your results.
Note that Kastner clusters his standard errors by dyad, which makes his standard errors larger (and his t statistics smaller) than what you will find using ordinary standard errors. 

Use the results in 3. to interpret the coefficients for conflict, trade barriers. Make sure to note when the coefficients are nonsensical or at least how our ability to interpret them is impaired by the ranges of these two variables.
Next, use the results to calculate the following:

a) the linear equation that expresses the marginal effects of conflict on trade (at all levels of trade barriers). State it first as a literal equation, and then substitute numeric values based on the regression model.
=

=

b) the linear equation that expresses the marginal effects of trade barriers on trade (at all levels of conflict). Again, state it first as a literal equation, and then substitute numeric values based on the regression model.
=

=

Generate and display the variance-covariance matrix of the estimators. Then, use this matrix to calculate the following:
a) the quadratic equation that expresses the standard error of the marginal effects of conflict on trade (across all levels of trade barriers)
s.e. () =

=

b) the quadratic equation that expresses the standard error of the marginal effects of trade barriers on trade (across all levels of conflict)
s.e. () =

=

Kastner’s focus is on how the strength or weakness of internationalist interests moderates the effect of conflict (and not the other way around), but Berry, Golder, and Milton (2012) show that Kastner’s theory is not well supported by the data, so instead…

Treat trade barriers as the variable whose effect you are interested in, and treat conflict as the moderator. The obvious hypothesis is that trade barriers will have a negative effect on trade, and the size of this effect should be exacerbated by conflict. Show this by plotting the marginal effect of trade barriers on trade across all levels of conflict. Include the 95% confidence interval for the marginal effect.
Use the results of either (a) this plot, or (b) t statistics calculated for specific values of conflict, to identify regions where trade barriers has a statistically significant effect on the amount of trade in a dyad.

More products