show all work include any Stata work
Use the data set chick6.xls in Moodle to answer the following:
In the chick6 data set y=per capita chicken consumption, pounds per year; yd= disposable income per capita, hundreds of dollars; pc=price of chicken, cents per pound; pb=price of beef, cents per pound.
Before beginning you will want to inform STATA that this dataset are in the time-series format. To do this, generate a variable that identifies time. In STATA, type generate time=_n. Then type tsset time.
Chick6 data
OBS | YEAR | Y | PC | PB | YD | TEMP | PRP |
1 | 1974 | 39.7 | 42.3 | 143.8 | 50.1 | -16 | 107.8 |
2 | 1975 | 38.69 | 49.4 | 152.2 | 54.98 | -4 | 134.6 |
3 | 1976 | 42.02 | 45.5 | 145.7 | 59.72 | -24 | 134 |
4 | 1977 | 42.71 | 45.3 | 145.9 | 65.17 | 16 | 125.4 |
5 | 1978 | 44.75 | 49.3 | 178.8 | 72.24 | 5 | 143.6 |
6 | 1979 | 48.35 | 50 | 222.4 | 79.67 | 13 | 152.5 |
7 | 1980 | 48.47 | 53.5 | 233.6 | 88.22 | 21 | 147.5 |
8 | 1981 | 50.37 | 53.8 | 234.7 | 97.65 | 49 | 161.2 |
9 | 1982 | 51.52 | 51.5 | 238.4 | 104.26 | 4 | 185.6 |
10 | 1983 | 52.55 | 56 | 234.1 | 111.31 | 35 | 179.7 |
11 | 1984 | 54.61 | 61.5 | 235.5 | 123.19 | 11 | 171.4 |
12 | 1985 | 56.42 | 56.2 | 228.6 | 130.37 | 4 | 170.8 |
13 | 1986 | 57.7 | 63.1 | 226.8 | 136.49 | 18 | 188.8 |
14 | 1987 | 61.94 | 53.1 | 238.4 | 142.41 | 35 | 199.4 |
15 | 1988 | 63.8 | 62.1 | 250.3 | 152.97 | 46 | 194 |
16 | 1989 | 66.88 | 64.2 | 265.7 | 162.57 | 32 | 193.5 |
17 | 1990 | 70.34 | 60.5 | 281 | 171.31 | 64 | 224.9 |
18 | 1991 | 73.26 | 57.7 | 288.3 | 176.09 | 52 | 224.2 |
19 | 1992 | 76.39 | 59 | 284.6 | 184.94 | 18 | 209.5 |
20 | 1993 | 78.27 | 27.1 | 293.4 | 188.72 | 27 | 209.1 |
21 | 1994 | 79.65 | 26.2 | 282.9 | 195.55 | 48 | 209.5 |
22 | 1995 | 79.27 | 26.9 | 284.3 | 202.87 | 71 | 206.1 |
23 | 1996 | 80.61 | 28 | 280.2 | 210.91 | 36 | 233.7 |
24 | 1997 | 83.1 | 33.2 | 279.5 | 219.4 | 60 | 245 |
25 | 1998 | 83.76 | 33.4 | 277.1 | 231.61 | 89 | 242.7 |
26 | 1999 | 88.98 | 39.5 | 287.8 | 239.68 | 60 | 241.4 |
27 | 2000 | 90.08 | 43 | 306.4 | 254.69 | 62 | 258.2 |
28 | 2001 | 89.71 | 43.4 | 337.7 | 262.24 | 74 | 269.4 |
29 | 2002 | 94.37 | 43.9 | 331.5 | 271.45 | 85 | 265.8 |
a) syntax
set obs 29
number of observations (_N) was 29, now 29
. generate time =_n
. tsset time
time variable: time, 1 to 29
delta: 1 unit
. reg Y PC PB YD
Regression result
Source | SS df MS Number of obs = 29
-------------+---------------------------------- F(3, 25) =
964.88
Model | 8465.4915 3 2821.8305 Prob > F = 0.0000
Residual | 73.113677 25 2.92454708 R-squared = 0.9914
-------------+---------------------------------- Adj R-squared =
0.9904
Total | 8538.60518 28 304.950185 Root MSE = 1.7101
------------------------------------------------------------------------------
Y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
PC | -.1097636 .0324726 -3.38 0.002 -.1766421 -.042885
PB | .0319748 .0172014 1.86 0.075 -.0034522 .0674017
YD | .2266944 .0144516 15.69 0.000 .1969308 .256458
_cons | 27.68981 2.500578 11.07 0.000 22.53977 32.83985
-----------------------------------------------------------------------------
For elasticity
Syntax
margins, eyex(PC) atmeans
Result
Conditional marginal effects Number of obs =
> 29
Model VCE : OLS
Expression : Linear prediction, predict()
ey/ex w.r.t. : PC
at : PC = 47.53793 (mean)
PB = 247.9172 (mean)
YD = 153.1303 (mean)
--------------------------------------------------------------------
> ----------
| Delta-method
| ey/ex Std. Err. t P>|t| [95% Conf.
> Interval]
-------------+------------------------------------------------------
> ----------
PC | -.0801369 .023711 -3.38 0.002 -.1289706
> -.0313031
--------------------------------------------------------------------
The price elasticity of chicken is Inelastic if we look at the absolute value of ey/ex the value is less than 1 which Imply inelastic demand.
b)Syntax
corr ( Y PC PB YD)
(obs=29)
| Y PC PB YD
-------------+------------------------------------
Y | 1.0000
PC | -0.4399 1.0000
PB | 0.9231 -0.2291 1.0000
YD | 0.9937 -0.3932 0.9247 1.0000
From the above output result, it is clearly visible that
there is a problem of multicollinearity between the variables PB
and Y, as well as in between YD and Y also YD and
PB
The syntax for the variance inflation
factor.
vif
Variable | VIF 1/VIF
-------------+----------------------
YD | 9.07 0.110276
PB | 8.09 0.123596
PC | 1.39 0.720682
-------------+----------------------
Mean VIF | 6.18
Two variables have VIF greater than 4 that is YD and PB. Hence we can conclude that there is a problem of multicollinearity.
c) The null hypothesis is that the model has no omitted variables; the alternative is that there is.
The following is the Syntax for RAMSEY RESET TEST
estat ovtest
Ramsey RESET test using powers of the fitted values of Y
Ho: model has no omitted variables
F(3, 21) = 5.58
Prob > F = 0.0056
At 5% level of significance we can reject the null Hypothesis and we can conclude that the model has omitted variables hence Significant.
d) First, we will generate the log variable for lin-log model and after generating the variable we will regress the newly generated variables with the dependent variable.
The following are the syntax and teh output file.
gen lpc = log(PC)
. gen lpb = log(PB)
. gen lyd = log(YD)
. reg Y lpc lpb lyd
Source | SS df MS Number of obs = 29
-------------+---------------------------------- F(3, 25) =
214.96
Model | 8219.94858 3 2739.98286 Prob > F = 0.0000
Residual | 318.656601 25 12.746264 R-squared = 0.9627
-------------+---------------------------------- Adj R-squared =
0.9582
Total | 8538.60518 28 304.950185 Root MSE = 3.5702
------------------------------------------------------------------------------
Y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lpc | -9.028432 2.720089 -3.32 0.003 -14.63056 -3.426303
lpb | -8.940055 8.807944 -1.01 0.320 -27.08035 9.200245
lyd | 35.9398 4.374833 8.22 0.000 26.92966 44.94994
_cons | -28.1116 28.50739 -0.99 0.334 -86.82367 30.60047
The linear model is better because the R squared value is
99% which is greater than the lin-log model and hence is the best
model.
d) For log-log model first, we will generate the dependent variable in form of log with the help of "generate" syntax.
gen lY =log(Y)
now we will regress the double log model with lY as the
dependent variable.
reg lY lpc lpb lyd
Source | SS df MS Number of obs = 29
-------------+---------------------------------- F(3, 25) =
531.05
Model | 2.13648586 3 .712161955 Prob > F = 0.0000
Residual | .033526309 25 .001341052 R-squared = 0.9846
-------------+---------------------------------- Adj R-squared =
0.9827
Total | 2.17001217 28 .077500435 Root MSE = .03662
------------------------------------------------------------------------------
lY | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lpc | -.1028254 .0279007 -3.69 0.001 -.1602879 -.0453629
lpb | -.0334645 .0903454 -0.37 0.714 -.2195343 .1526053
lyd | .5409689 .0448738 12.06 0.000 .4485496 .6333883
_cons | 2.055127 .2924077 7.03 0.000 1.452902 2.657352
The coefficient of the log-log model gives the value of elasticity. Therefore from the output file we can simply see the elasticity value.
We cannot compare the log-log model with the lin-log
model and the linear equation model
because the dependent variables are
not the same and hence
we can not make use of the
R2 that defines the fitness of the
model.
show all work include any Stata work Use the data set chick6.xls in Moodle to answer the...
Y PC PB YD TEMP PRP 39.7 42.3 143.8 50.1 -16 107.8 38.69 49.4 152.2 54.98 -4 134.6 42.02 45.5 145.7 59.72 -24 134 42.71 45.3 145.9 65.17 16 125.4 44.75 49.3 178.8 72.24 5 143.6 48.35 50 222.4 79.67 13 152.5 48.47 53.5 233.6 88.22 21 147.5 50.37 53.8 234.7 97.65 49 161.2 51.52 51.5 238.4 104.26 4 185.6 52.55 56 234.1 111.31 35 179.7 54.61 61.5 235.5 123.19 11 171.4 56.42 56.2 228.6 130.37 4 170.8 57.7 63.1...
2. Use the data in hpricel.wfl uploaded on Moodle for this exercise. We assume that all assump- tions of the Classical Linear Model are satisfied for the model used in this question. (a) Estimate the model and report the results in the usual form, including the standard error of the regression. Obtain the predicted price when we plug in lotsize - 10, 000, sqrft - 2,300, and bdrms- 4; round this price to the nearest dollar. (b) Run a regression...