7.2 Checking the procedure with fake-data simulation
Step 1: Creating Pretend world.
Assume \(y = 61.9 - 1.1 x + \text{error}\) is true, \(\text{error} \sim N(0,2.5)\)
a <- 61.9
b <- -1.1
sigma <- 2.5
## Use predictors from data set
x <- exercise$strengthTraining
n <- length(x)
- Step 2: Simulating fake data
- Step 3: Fit the fake data
## Median MAD_SD
## (Intercept) 58.8 4.2
## x -1.0 0.1
##
## Auxiliary parameter(s):
## Median MAD_SD
## sigma 2.7 0.3
We can see in this particular simulation, the fit is consistent with the assumed model. But to understand this better we embed this in a loop…