Skip to content

Constraints might not be fulfilled without a warning #250

@nbruder

Description

@nbruder

If the constraints are too restrictive, adoptr cannot find a suitable design. But no warning is returned, so the user does not know whether the returned design does indeed fulfill the constraints. A small example:


null        <- PointMassPrior(.0, 1)
alternative <- PointMassPrior(.4, 1)
datadist    <- Normal()
ess   <- ExpectedSampleSize(datadist, alternative)
toer  <- Power(datadist, null)
power <- Power(datadist, alternative)

initial_design <- get_initial_design(.4, 0.025, 0.2, "two-stage", datadist)
incorrect_design <- minimize(ess, subject_to(toer <= 0.025, power >= 0.8, MaximumSampleSize() <= 90), 
                         initial_design = initial_design)

evaluate(toer, incorrect_design$design)
evaluate(power, incorrect_design$design)

This could be an issue of the underlying optimization algorithm from the nloptr package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions