powered by
A basic grid search optimizer. Here, used to estimate the variance in the latent model by maximum likelihood.
theta_var_est_grid(likelihood_theta_var)
The scalar value that optimizes likelihood_theta_var, or an error if this value is on the search boundary \([10^{-6}, 10^2]\).
likelihood_theta_var
some flavor of likelihood function in terms of latent variance
likelihood_theta_var may be created using adj_resid_likelihood_theta_var_maker or similar.
adj_resid_likelihood_theta_var_maker
We recommended implementing a more robust optimizer.
X <- matrix(1:10, ncol=1) Y <- 2*X + rnorm(10, sd=1.1) D <- rep(1, 10) adj.lik <- adj_resid_likelihood_theta_var_maker(X, Y, D) theta_var_est_grid(adj.lik)
Run the code above in your browser using DataLab