Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

library(tseries)library(forecast)library(fredr)fredr_set_key('25e01a7269f9d0fdd83a00ee95e51aee')HP=fredr( series_id = NYSTHPI, observation_start = as.Date(1980-01-01), observation_end = as.Date(2023-01-01))head(HP)plot(HP$date,HP$value, type=l)HP_INY=ts(HP$value, frequency=4, start=c(1980,01))plot(HP_INY)head(HP_INY)trend=seq(HP_INY)trendtrend=1:173plot(trend)trendLinearModel_HPNY=tslm(HP_INY~trend)summary(LinearModel_HPNY)checkresiduals(LinearModel_HPNY)AIC(LinearModel_HPNY)BIC(LinearModel_HPNY)accuracy(LinearModel_HPNY)forecast_LinearModel_HPNY=forecast(LinearModel_HPNY, h=4)plot(forecast_LinearModel_HPNY)summary(forecast_LinearModel_HPNY)LinearModel_HPNY2=tslm(HP_INY~trend+season)checkresiduals(LinearModel_HPNY2) summary(LinearModel_HPNY2)AIC(LinearModel_HPNY2)BIC(LinearModel_HPNY2)accuracy(LinearModel_HPNY2)forecast_LinearModel_HPNY2=forecast(LinearModel_HPNY2, h=4)plot(forecast_LinearModel_HPNY2)summary(forecast_LinearModel_HPNY2)accuracy(forecast_LinearModel_HPNY2) gdp=fredr( series_id = gdp, observation_start = as.Date(1980-01-01), observation_end =

library(tseries)library(forecast)library(fredr)fredr_set_key('25e01a7269f9d0fdd83a00ee95e51aee')HP=fredr( series_id = "NYSTHPI", observation_start = as.Date("1980-01-01"), observation_end = as.Date("2023-01-01"))head(HP)plot(HP$date,HP$value, type="l")HP_INY=ts(HP$value, frequency=4, start=c(1980,01))plot(HP_INY)head(HP_INY)trend=seq(HP_INY)trendtrend=1:173plot(trend)trendLinearModel_HPNY=tslm(HP_INY~trend)summary(LinearModel_HPNY)checkresiduals(LinearModel_HPNY)AIC(LinearModel_HPNY)BIC(LinearModel_HPNY)accuracy(LinearModel_HPNY)forecast_LinearModel_HPNY=forecast(LinearModel_HPNY, h=4)plot(forecast_LinearModel_HPNY)summary(forecast_LinearModel_HPNY)LinearModel_HPNY2=tslm(HP_INY~trend+season)checkresiduals(LinearModel_HPNY2) summary(LinearModel_HPNY2)AIC(LinearModel_HPNY2)BIC(LinearModel_HPNY2)accuracy(LinearModel_HPNY2)forecast_LinearModel_HPNY2=forecast(LinearModel_HPNY2, h=4)plot(forecast_LinearModel_HPNY2)summary(forecast_LinearModel_HPNY2)accuracy(forecast_LinearModel_HPNY2) gdp=fredr( series_id = "gdp", observation_start = as.Date("1980-01-01"), observation_end = as.Date("2023-01-01"))gdp=ts(gdp$value, frequency=4, start=c(1980,01))plot(gdp,HP_INY)LinearModel_HPNY3=tslm(HP_INY~trend+gdp)checkresiduals(LinearModel_HPNY3) # this is a wrongly specified model: mising an important variable or wrong functional form.head(gdp)summary(LinearModel_HPNY3)AIC(LinearModel_HPNY3)BIC(LinearModel_HPNY3)accuracy(LinearModel_HPNY3)predict(LinearModel_HPNY3, data.frame(trend=c(174,175,176), gdp=c(24000, 25000, 27000)), interval="confidence")plot(gdp,residuals(LinearModel_HPNY3))plot(fitted(LinearModel_HPNY3), residuals(LinearModel_HPNY3))

image text in transcribed
Please make areference to the video and the code | shared to complete this assignment. 1. Estimate the trend coefficient for House Price Index for the United States. The code from fred is USSTHPI. Please explain the estimated trend coefficient and if it is statistically significant. 2. Check the residuals and see if they are correlated. 3 Report AIC, BIC from the estimated model. 4. Forecast the next 4 quarters based on the trend. 5. Do the results change when you add the quadratic trend. Please explain. Report all the code and R results in aword document

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Economics

Authors: David Colander

7th Edition

0073402869, 9780073402864

More Books

Students also viewed these Economics questions

Question

Discuss the steps in constructing k and R charts. AppendixLO1

Answered: 1 week ago

Question

Necesito la solucion de esa tarea

Answered: 1 week ago

Question

A greater tendency to create winwin situations.

Answered: 1 week ago

Question

Improving creative problem-solving ability.

Answered: 1 week ago