# write the function `GDP_OLS` set.seed(1) # write the function `GDP_OLS` DGP_OLS <- function() { X <- runif(100,2,10) Y <- 2*X + rnorm(100, sd = sqrt(X)) return( c("beta_1_hat" = sum(X*Y)/sum(X^2)) ) } test_function_definition("DGP_OLS", function_test = test_expression_result("DGP_OLS()") ) success_msg("Well Done!")