rasmusab / bayesian_first_aid

Inside every classical test there is a Bayesian model trying to get out.
326 stars 40 forks source link

Weird error in bayes.prop.test #5

Closed Paradosso closed 9 years ago

Paradosso commented 9 years ago

This just started happening:

`> x <- c(122, 99)

n <- c(4923, 5001) bayes.prop.test(x, n)

Error in get(as.character(FUN), mode = "function", envir = envir) : object 'home_state' of mode 'function' was not found`

I have the following packages loaded:

`> sessionInfo() R version 3.1.1 Patched (2014-08-27 r66482) Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] BayesianFirstAid_0.1 rjags_3-13 coda_0.16-1
[4] lattice_0.20-29 lazyeval_0.1.9 stringr_0.6.2
[7] reshape2_1.4 PerformanceAnalytics_1.4.3541 magrittr_1.0.1
[10] wf_1.0 timeDate_3010.98 quantmod_0.4-0
[13] TTR_0.22-0 Defaults_1.1-1 xts_0.9-7
[16] zoo_1.7-11 rjson_0.2.14 testthat_0.8.1
[19] roxygen2_4.0.2 devtools_1.5 RCurl_1.95-4.3
[22] bitops_1.0-6 lubridate_1.3.3 assertthat_0.1
[25] scales_0.2.4 ggthemes_1.7.0 tidyr_0.1
[28] ggplot2_1.0.0 dplyr_0.3.0.2 RPostgreSQL_0.4
[31] DBI_0.3.0

loaded via a namespace (and not attached): [1] colorspace_1.2-4 digest_0.6.4 evaluate_0.5.5 grid_3.1.1 gtable_0.1.2
[6] httr_0.5 labeling_0.3 MASS_7.3-34 memoise_0.2.1 mnormt_1.5-1
[11] munsell_0.4.2 parallel_3.1.1 plyr_1.8.1 proto_0.3-10 RColorBrewer_1.0-5 [16] Rcpp_0.11.2 tools_3.1.1 whisker_0.3-2 `

This does not happen with a fresh instance of R, so probably a masking problem.

rasmusab commented 9 years ago

Hi Roberto,

Thank you for reporting this! Could you run traceback() after the error has occured in order to get a better clue where in bayes.prop.test the error occurs? (like described here: http://stackoverflow.com/a/13456041/1001848)

Best, Rasmus

On Mon, Nov 17, 2014 at 11:19 PM, Roberto Medri notifications@github.com wrote:

This just started happening:

`> x <- c(122, 99)

n <- c(4923, 5001) bayes.prop.test(x, n)

Error in get(as.character(FUN), mode = "function", envir = envir) : object 'home_state' of mode 'function' was not found`

I have the following packages loaded:

`> sessionInfo() R version 3.1.1 Patched (2014-08-27 r66482) Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] BayesianFirstAid_0.1 rjags_3-13 coda_0.16-1

[4] lattice_0.20-29 lazyeval_0.1.9 stringr_0.6.2

[7] reshape2_1.4 PerformanceAnalytics_1.4.3541 magrittr_1.0.1

[10] wf_1.0 timeDate_3010.98 quantmod_0.4-0

[13] TTR_0.22-0 Defaults_1.1-1 xts_0.9-7

[16] zoo_1.7-11 rjson_0.2.14 testthat_0.8.1

[19] roxygen2_4.0.2 devtools_1.5 RCurl_1.95-4.3

[22] bitops_1.0-6 lubridate_1.3.3 assertthat_0.1

[25] scales_0.2.4 ggthemes_1.7.0 tidyr_0.1

[28] ggplot2_1.0.0 dplyr_0.3.0.2 RPostgreSQL_0.4

[31] DBI_0.3.0

loaded via a namespace (and not attached): [1] colorspace_1.2-4 digest_0.6.4 evaluate_0.5.5 grid_3.1.1 gtable_0.1.2

[6] httr_0.5 labeling_0.3 MASS_7.3-34 memoise_0.2.1 mnormt_1.5-1

[11] munsell_0.4.2 parallel_3.1.1 plyr_1.8.1 proto_0.3-10 RColorBrewer_1.0-5 [16] Rcpp_0.11.2 tools_3.1.1 whisker_0.3-2 `

This does not happen with a fresh instance of R, so probably a masking problem.

— Reply to this email directly or view it on GitHub https://github.com/rasmusab/bayesian_first_aid/issues/5.

/Rasmus