# R

## BT Question Set P1-T2-21-1: Non-stationary time series

21.1.1 This is a seasonal model without a trend 21.1.1 The following seasonal dummy model estimates the quarterly growth rate (in percentage terms) of housing starts … The model’s intercept (δ) equals +1.

## BT Question Set P1-T2-20-25: Long-horizon forecasts

T2-20-25 20.25.1. Over the prior ten months of the calendar year, below is plotted the monthly growth rate of a new cryptocurrency. Two months ago, the growth rate was + 0.

## BT Question Set P1-T2-20-22-2: AR versus MA process

P1.T2.20.22. Stationary Time Series: autoregressive (AR) and moving average (MA) processes Learning objectives Define and describe the properties of autoregressive (AR) processes. Define and describe the properties of moving average (MA) processes.

## BT Question Set P1-T2-20-21-3: White Noise (WN) Process

P1-T2-20-21-3: White Noise (WN) Process) 20.21.3. Barbara was delighted to learn that she can easily simulate white noise in R with a single command. She learned that she can use arima.

## BT Question Set P1-T2-20-21-2: Autocorrelation function (ACF)

20.21.2. Shown below is the autocorrelation function (ACF) for a time series object that contains the total quarterly beer production in Australia (in megalitres) from 1956:Q1 to 2010:Q2 (source: https://cran.

## BT Question Set P1-T2-20-20-2: m-fold cross-validation

m-fold cross-validation Our question P1-T2-20-2 (located at https://www.bionicturtle.com/forum/threads/p1-t2-20-20-regression-diagnostics-outliers-cooks-distance-m-fold-cross-validation-and-residual-diagnostics.23497/) mimics GARP’s approach in their Chapter 9; in particular their solution 9.14. However, it makes the mistake of using cross-validation to select the regression coefficients.

## BT Question P1-T2-20-20-3: Regression diagnostic plots

BT Question 20.20.3 20.20.3. Patrick generated a simple regression line for a sample of 50 pairwise observations. After generating the regression model, he ran R’s built-in plot(model) function which produces a standard set of regression diagnostics.

## BT Question Set P1-T2-20-19: Regression diagnostics (1st set)

P1.T2.20.19. Regression diagnostics: omitted variables, heteroskedasticity, and multicollinearity Question 1: Fama-french 2-factor <- omitted variable 20.19.1. Jane manages a market-neutral equity fund for her investment management firm. The fund’s market-neutral style implies (we will assume) that the fund’s beta with respect to the market’s excess return is zero.

## BT Question Set P1-T2-20-18: Multivariate regressions

Multiple regression Question 1: Fama-french library(tidyverse) library(broom) library(gt) intercept <- .03 intercept_sig <- .01 x1_mu <- .04 x1_sig <- .01 x1_beta <- 0.4 x2_mu <- .03 x2_sig <- .01 x2_beta <- -0.

## BT Question Set P1-T2-20-17: Univariate regressions continued (2nd set v2)

Learning objectives Construct, apply, and interpret hypothesis tests and confidence intervals for a single regression coefficient in a regression. Explain the steps needed to perform a hypothesis test in a linear regression.