Skip to content

Commit

Permalink
updating example
Browse files Browse the repository at this point in the history
  • Loading branch information
bomeara committed May 6, 2021
1 parent 1a5739f commit ce2fc81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/dentist.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#'
#' optimized_results <- optimize(dnorm_to_run,interval=range(possible_means), sims=sims, maximum=FALSE)
#' best_par <- optimized_results$minimum
#' best_neglogL <- optimized_results$objective
#' best_neglnL <- optimized_results$objective
#'
#' dented_results <- dent_walk(par=best_par, fn=dnorm_to_run, best_neglnL=best_neglnL, nsteps=1000, sims=sims)
#' plot(dented_results$results$mean, dented_results$results$neglnL)
Expand All @@ -41,7 +41,7 @@ dent_walk <- function(par, fn, best_neglnL, delta=2, nsteps=1000, print_freq=50,
acceptances <- rep(NA, nsteps)
for (rep_index in sequence(nsteps)) {
old_params <- as.numeric(results[rep_index,-1])
new_params <- ProposeValues(old_params, lower_bound=lower_bound, upper_bound=upper_bound, sd=sd_vector)
new_params <- dent_propose(old_params, lower_bound=lower_bound, upper_bound=upper_bound, sd=sd_vector)
new_neglnL <- fn(par=new_params, ...)

new_dented_neglnL <- dent_likelihood(new_neglnL, best_neglnL, delta)
Expand Down
2 changes: 1 addition & 1 deletion man/dent_walk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce2fc81

Please sign in to comment.