x <- 1:10
boxcox_itr(x, 0.3)
boxcox_itr_bias_cor(x, 0.3, 0)
boxcox_itr_bias_cor(x, 0.3, 2)
# plot functions
curve(boxcox_itr(x, 0.3), 0, 3,
col = "blue",
main = "inverse Box Cox transf., lambda = 0.3",
xlab = "x", ylab = "inverse Boxcox(x, lambda = 0.3)"
)
curve(boxcox_itr_bias_cor(x, 0.3, 1), 0, 3, col = "red", add = TRUE)
curve(boxcox_itr_bias_cor(x, 0.3, 2), 0, 3, col = "black", add = TRUE)
legend("topleft",
legend = c(
"residuals variance = 2",
"residuals variance = 1", "residuals variance not accounted for"
),
col = c("black", "red", "blue"), lty = 1
)
Run the code above in your browser using DataLab