knitr::opts_chunk$set(echo = TRUE, include = TRUE)
set.seed(123) n_coins <- 50 tosses <- 10 p_heads <- 0.5
results <- rbinom(n_coins, tosses, p_heads)
dbinom(7, tosses, p_heads)
dbinom(8, tosses, p_heads)
dbinom(9, tosses, p_heads)
dbinom(10, tosses, p_heads)
surprise_threshhold <- 8
picks <- seq_along(results)[results >= surprise_threshhold]
picks
results[results >= surprise_threshhold]
r n_coins
.tosses_large <- 1000 pbinom(800, tosses_large, 0.5, lower.tail = FALSE) pbinom(550, tosses_large, 0.5, lower.tail = FALSE) pbinom(525, tosses_large, 0.5, lower.tail = FALSE) pbinom(526, tosses_large, 0.5, lower.tail = FALSE)
surprise_threshhold_large <- 526 results_large <- rbinom(n_coins, tosses_large, p_heads) picks_large <- seq_along(results_large)[results_large >= surprise_threshhold_large] length(picks_large) picks_large results_large[results_large >= surprise_threshhold_large]
Predictors | Noise | %Noise -----------|--------|------- 12 | 0.43 | 20 18 | 0.96 | 40 24 | 1.44 | 46
Number of candidate predictor variables affected the number of noise variables that gained entry to the model
Effect of multicollinearity (correlation of 0.4)
Predictors | Noise | %Noise -----------|--------|------- 12 | 0.47 | 35 18 | 0.93 | 59 24 | 1.36 | 62
Predictors | Actual | Noise | %Noise -----------|--------|--------|------- 12 | 1.70 | 0.43 | 20 18 | 1.64 | 0.96 | 40 24 | 1.66 | 1.44 | 46
Number of candidate predictor variables affected the number of noise variables that gained entry to the model
Effect of multicollinearity (correlation of 0.4)
Predictors | Actual | Noise | %Noise -----------|--------|--------|------- 12 | 0.86 | 0.47 | 35 18 | 0.87 | 0.93 | 59 24 | 0.83 | 1.36 | 62
knitr::include_graphics("images/actual_vs_Y.png")
knitr::include_graphics("images/noise_vs_Y.png")
knitr::include_graphics("images/selected_noise_vs_Y.png")
$N = 900$
Predictors | Noise $\alpha = 0.0016$ |Noise $\alpha = 0.15$ -----------|-------------------------|---------------------- 12 | 2 | 2 18 | 3 | 3 24 | 4 | 4 50 | 8 | 10 100 | 16 | 17
$min||\mathbf{y - X\beta}||^2$ subject to $\sum\limits_{j=1}^{m} |\beta_{j}| \leq t$
$min||\mathbf{y - X\beta}||^2$ subject to $\sum\limits_{j=1}^{m} |\beta_{j}| \leq t_1$, $\sum\limits_{j=1}^{m} \beta_{j}^{2} \leq t_2$
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.