For this question you will use the dataset "murder.xls", which includes:
• rate = Murder rate per 100,000
• convictions = Number of convictions divided by number of murders
• executions = Average number of executions divided by convictions
• time = Median time served (in months) of convicted murderers
• income = Median family income (in 1,000 USD)
• lfp = Labor force participation rate (in percent)
• noncauc = Proportion of population that is non-Caucasian
• southern = Factor indicating region.
1. Use the MATLAB "regress" function to estimate the following model:
ratei = β0 + β1incomei + β2noncauci + ui.
Estimate the coefficient for the impact of income on murder rates.
The answer should be -3.19.
2. Recall that you can obtain the OLS estimate of β using the following matrix operation:
β =(XT X)-1XT y.
Use the matrix operation commands in MATLAB to
calculate β for the intercept, income, and noncauc.
Hint Your first step should be creating the matrix, X, that includes a constant, income and noncauc. I also recommend breaking the operation out into steps, rather than trying to do it all in one line of code.