NAME: KAYNAT SOHAIL
REG NO:3808FE/BSECOF20
ASSIGNGMENT#3REG AND DIAGONOSTIC TEST (multi , hetero, auto)
MULTICOLLINEARITY:
. reg GDP CPI IMP PPI
Source SS df MS Number of obs = 34
F(3, 30) = 356.48
Model 1155.70012 3 385.233373 Prob > F = 0.0000
Residual 32.4198803 30 1.08066268 R-squared = 0.9727
Adj R-squared = 0.9700
Total 1188.12 33 36.0036364 Root MSE = 1.0395
GDP Coef. Std. Err. t P>|t| [95% Conf. Interval]
CPI -.3095376 .1075837 -2.88 0.007 -.5292528 -.0898224
IMP .0008023 .0000642 12.50 0.000 .0006712 .0009334
PPI .4878639 .1355326 3.60 0.001 .2110695 .7646583
_cons 55.26335 3.517844 15.71 0.000 48.07896 62.44775
. vif
Variable VIF 1/VIF
CPI 40.18 0.024890
PPI 29.36 0.034054
IMP 6.54 0.152904
Mean VIF 25.36
There is a problem of multicollinearity so we omit one variable then again we will take a reg.
. reg GDP CPI IMP
Source SS df MS Number of obs = 34
F(2, 31) = 381.20
Model 1141.69779 2 570.848897 Prob > F = 0.0000
Residual 46.4222066 31 1.49749053 R-squared = 0.9609
Adj R-squared = 0.9584
Total 1188.12 33 36.0036364 Root MSE = 1.2237
GDP Coef. Std. Err. t P>|t| [95% Conf. Interval]
CPI .0463967 .0498971 0.93 0.360 -.0553691 .1481626
IMP .0007525 .0000738 10.20 0.000 .000602 .000903
_cons 52.97083 4.072649 13.01 0.000 44.66461 61.27705
. vif
Variable VIF 1/VIF
CPI 6.24 0.160337
IMP 6.24 0.160337
Mean VIF 6.24
There is no problem of multicollinearity because the value of VIF is less than [Link] value
of VIF is 6.24.
HETEROSKEDASTICITY:
. reg PRICE ROOMS SQFEET
Source SS df MS Number of obs = 88
F(2, 85) = 72.96
Model 5.8001e+11 2 2.9000e+11 Prob > F = 0.0000
Residual 3.3785e+11 85 3.9747e+09 R-squared = 0.6319
Adj R-squared = 0.6233
Total 9.1785e+11 87 1.0550e+10 Root MSE = 63045
PRICE Coef. Std. Err. t P>|t| [95% Conf. Interval]
ROOMS 15198.19 9483.517 1.60 0.113 -3657.581 34053.96
SQFEET 128.4362 13.82446 9.29 0.000 100.9495 155.9229
_cons -19315 31046.62 -0.62 0.536 -81043.99 42414
. estat hettest
Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
Ho: Constant variance
Variables: fitted values of PRICE
chi2(1) = 24.14
Prob > chi2 = 0.0000
There is a problem of hetero so we will take a log.
. reg logPRICE SQFEET ROOMS
Source SS df MS Number of obs = 88
F(2, 85) = 60.73
Model 4.71671482 2 2.35835741 Prob > F = 0.0000
Residual 3.30088938 85 .038833993 R-squared = 0.5883
Adj R-squared = 0.5786
Total 8.0176042 87 .09215637 Root MSE = .19706
logPRICE Coef. Std. Err. t P>|t| [95% Conf. Interval]
SQFEET .0003794 .0000432 8.78 0.000 .0002935 .0004654
ROOMS .0288845 .0296433 0.97 0.333 -.0300542 .0878233
_cons 11.67378 .0970445 120.29 0.000 11.48083 11.86673
. gen logROOMS=log(ROOMS)
. gen logSQFEET=log(SQFEET)
. reg logPRICE logROOMS logSQFEET
Source SS df MS Number of obs = 88
F(2, 85) = 53.23
Model 4.45830851 2 2.22915425 Prob > F = 0.0000
Residual 3.55929569 85 .041874067 R-squared = 0.5561
Adj R-squared = 0.5456
Total 8.0176042 87 .09215637 Root MSE = .20463
logPRICE Coef. Std. Err. t P>|t| [95% Conf. Interval]
logROOMS .0862815 .1124613 0.77 0.445 -.1373217 .3098847
logSQFEET .8337176 .0988369 8.44 0.000 .6372033 1.030232
_cons 6.119993 .6874313 8.90 0.000 4.753196 7.486791
. estat hettest
Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
Ho: Constant variance
Variables: fitted values of logPRICE
chi2(1) = 0.47
Prob > chi2 = 0.4917
AUTOCORRELATION:
. gen time=1985+_n-1
. tsset time
time variable: time, 1985 to 2022
delta: 1 unit
. reg CONS CONSREAL CONSTAR
Source SS df MS Number of obs = 38
F(2, 35) = 68.99
Model 3647.47345 2 1823.73672 Prob > F = 0.0000
Residual 925.266695 35 26.4361913 R-squared = 0.7977
Adj R-squared = 0.7861
Total 4572.74014 37 123.587571 Root MSE = 5.1416
CONS Coef. Std. Err. t P>|t| [95% Conf. Interval]
CONSREAL .5622991 1.147606 0.49 0.627 -1.767465 2.892063
CONSTAR 3748.006 10850.83 0.35 0.732 -18280.34 25776.36
_cons -132.0856 388.5801 -0.34 0.736 -920.945 656.7739
. estat bgodfrey
Breusch-Godfrey LM test for autocorrelation
lags(p) chi2 df Prob > chi2
1 29.213 1 0.0000
H0: no serial correlation
. reg CONSREAL CONSTAR CPI INC INCREAL LCONSR LINCR
note: CONSTAR omitted because of collinearity
Source SS df MS Number of obs = 38
F(5, 32) = 8664.11
Model 3970.47703 5 794.095405 Prob > F = 0.0000
Residual 2.9329084 32 .091653388 R-squared = 0.9993
Adj R-squared = 0.9991
Total 3973.40993 37 107.389458 Root MSE = .30274
CONSREAL Coef. Std. Err. t P>|t| [95% Conf. Interval]
CONSTAR 0 (omitted)
CPI -1.203696 .237861 -5.06 0.000 -1.688203 -.7191888
INC 1.239842 .2561849 4.84 0.000 .7180107 1.761674
INCREAL 2.799252 .29931 9.35 0.000 2.189578 3.408927
LCONSR 104.5652 1.018216 102.69 0.000 102.4911 106.6392
LINCR -404.3556 34.16013 -11.84 0.000 -473.9376 -334.7737
_cons 1200.315 135.0364 8.89 0.000 925.2552 1475.375
. estat bgodfrey
Breusch-Godfrey LM test for autocorrelation