Skip to content

New options for recompute(): maxError and attempts #70

Description

@crsh

Hi Richard,

I'm currently writing an analysis script for a sequential Bayesian analysis. I will run the script every night to decide if I continue data collection. For obvious reasons I want to base this decision on precise estimates of the Bayes Factors, so I want to recompute the BayesFactor objects until a desired level of precision is reached, without having to manually fiddle with the number of iterations and recomputation attempts.

My current approach to this is quite simply this:

while(any(object@bayesFactor$error > 0.01)) object <- recompute(object)

I think it would be helpful to offer this functionality within recompute(), e.g., by providing an option maxError. Additionally, an option such as attempts could provide the maximum number of recomputation attempts to satisfy the maxError condition.

object <- recompute(object, maxError = 0.01, attempts = 25)

This, to me at least, would be quite helpful.

I'm happy to give this a shot myself and make a pull request, if you like the idea.

Best regards,
Frederik

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions