<jupyter_start><jupyter_text>IntroductionThis in-class example demonstrates how to handle time trend, seasonality, and autoregressive processes.What you need to know:- Statsmodels and pandas modules in Python- Theoretical concepts on time series regression modelThe list of references for detailed concepts and techniques used in this exerise. *** Data DescriptionThe data set is contained in a comma-separated value (csv) file named ```CDN_hprice.csv``` with column headers. The data is a set of quarterly observations on a housing price index and other relevant variables in Canada for 1976 through 2019.This data set is obtained from [Federal Reserve Bank of Dallas's International House Price Database](https://www.dallasfed.org/institute/houseprice).Description of the data is as follow:| Variable name | Variable description || -- | ----------- || Year      | Year || Quarter   | Quarter || RHPI      | House Price Index (real) || RPDI      | Personal disposable income (real) || logRHPI   | log(RHPI)   || logRPDI   | log(RPDI)   || UE        | Unemployment rate (in percentage points) || CPI       | Consumer Price Index || TB10_rt   | 10-year treasury bond rate (nominal) || RTB10_rt  | 10-year Treasury Bond rate (real) | *** Load the required modules<jupyter_code>import numpy as np
import pandas as pd
import statsmodels
import statsmodels.api as sm
import statsmodels.formula.api as smf
import matplotlib.pyplot<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08184319119669876, 'fraction_numerical': 0.011004126547455296, 'mean_word_length': 4.329670329670329, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '377000', 'license': 'MIT', 'n_tokens_mistral': 400, 'n_tokens_neox': 362, 'n_words': 169, 'path': 'TS-ar1/TS_ar1.ipynb', 'repo_name': 'alexanderyuen/in-class-examples', 'size': '1454'}