Skip to content

Instantly share code, notes, and snippets.

@jsams
Last active April 16, 2019 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsams/cb00540186f19014002e4289827164b4 to your computer and use it in GitHub Desktop.
Save jsams/cb00540186f19014002e4289827164b4 to your computer and use it in GitHub Desktop.
if (RUN_RAND_EST) {
tic(sprintf("Estimation with %d cores:", core_count))
res3 = wrapper_rand(guess3, fun_xb=lklhd_statedep_xb_m, Xs=model_matrices,
choices=choice_matrices, eta=etas, eta_hh=eta_hh_indcs,
NS=NS, v2m=betas_rand_brand_v2m, cores=core_count, trace=1,
REPORT=5)
toc() # FAILS HERE
# error:
# label: unnamed-chunk-8
# Quitting from lines 182-208 (mlogit_heter_randcoef.spin.Rmd)
# Error in parse(text = x, srcfile = src) :
# <text>:27:0: unexpected end of input
# 25: REPORT=5)
# 26: toc()
# ^
# In addition: Warning message:
# In grDevices::png(f) : unable to open connection to X11 display ''
#
# Enter a frame number, or 0 to exit
#
# 1: rmarkdown::render("mlogit_heter_randcoef.R", "pdf_document")
# 2: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, enc
# 3: process_file(text, output)
# 4: withCallingHandlers(if (tangle) process_tangle(group) else process_gro
# 5: process_group(group)
# 6: process_group.block(group)
# 7: call_block(x)
# 8: block_exec(params)
# 9: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, ke
# 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALS
# 11: evaluate::evaluate(...)
# 12: parse_all(input, filename, stop_on_error != 2)
# 13: parse_all.character(input, filename, stop_on_error != 2)
# 14: parse(text = x, srcfile = src)
#
# Selection: 0
#' Results
#' =======
out = cbind(res1_2$par,
res3$par[1:7])
# ...a couple hundred more lines
}
# EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment