0% found this document useful (0 votes)
8 views2 pages

Eco Assign 1

The document presents a linear regression analysis of GDP growth based on various economic factors including exports, consumption, government consumption, and capital formation using data from the Philippines. The model shows significant coefficients for consumption and capital formation, with a high R-squared value indicating a good fit. Additionally, the Durbin-Watson test suggests no significant autocorrelation in the residuals.

Uploaded by

upmanyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Eco Assign 1

The document presents a linear regression analysis of GDP growth based on various economic factors including exports, consumption, government consumption, and capital formation using data from the Philippines. The model shows significant coefficients for consumption and capital formation, with a high R-squared value indicating a good fit. Additionally, the Durbin-Watson test suggests no significant autocorrelation in the residuals.

Uploaded by

upmanyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

> library(car)

> library(lmtest)
>
> data <- read_excel("C:/Users/upama/OneDrive/Documents/Phili.xlsx")
>
> names(data) = gsub(" ", "_", names(data))
>
> head(data)
# A tibble: 6 × 6
Year GDP_growth Exports Consumption Gov_Consumption Capital_Formation
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 2009 1.45 -4.71 3.54 11.0 -6.00
2 2010 7.33 20.3 3.66 4.17 30.5
3 2011 3.86 -0.781 5.09 1.91 -2.54
4 2012 6.90 4.51 7.88 15.5 5.43
5 2013 6.75 1.97 5.70 4.94 18.4
6 2014 6.35 12.1 5.50 3.62 8.28
>
> model <- lm(GDP_growth ~ Exports + Consumption + Gov_Consumption +
Capital_Formation, data = data)
>
> summary(model)

Call:
lm(formula = GDP_growth ~ Exports + Consumption + Gov_Consumption +
Capital_Formation, data = data)

Residuals:
Min 1Q Median 3Q Max
-0.96488 -0.33473 0.02474 0.36183 0.83197

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.34005 0.43711 0.778 0.45460
Exports 0.05710 0.03596 1.588 0.14334
Consumption 0.86254 0.07971 10.821 7.68e-07 ***
Gov_Consumption -0.10646 0.04274 -2.491 0.03193 *
Capital_Formation 0.08793 0.02474 3.554 0.00523 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6281 on 10 degrees of freedom


Multiple R-squared: 0.9848, Adjusted R-squared: 0.9787
F-statistic: 161.8 on 4 and 10 DF, p-value: 4.828e-09

>
> vif_values <- vif(model)
> print("VIF Values:")
[1] "VIF Values:"
> print(vif_values)
Exports Consumption Gov_Consumption Capital_Formation
3.809060 2.260675 1.134099 4.847880
>
> dw_test <- dwtest(model)
> print("Durbin-Watson Test:")
[1] "Durbin-Watson Test:"
> print(dw_test)

Durbin-Watson test
data: model
DW = 2.1346, p-value = 0.6995
alternative hypothesis: true autocorrelation is greater than 0

You might also like