Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking formula input #118

Closed
athowes opened this issue Jun 19, 2024 · 0 comments · Fixed by #139
Closed

Checking formula input #118

athowes opened this issue Jun 19, 2024 · 0 comments · Fixed by #139
Assignees

Comments

@athowes
Copy link
Collaborator

athowes commented Jun 19, 2024

I think that epidist_formula should pass tests of this form. It currently doesn't.

test_that("epidist_formula.epidist_latent_individual with custom formulas errors for incorrect custom formulas", { # nolint: line_length_linter.
  expect_error(epidist_formula(prep_obs, delay_central = ~ 1 + age))
  expect_error(epidist_formula(prep_obs, sigma = ~ 1 + age))
  expect_error(epidist_formula(prep_obs, delay_central = 1))
  expect_error(epidist_formula(prep_obs, sigma = 1))
})

I propose to add the following to epidist_formula:

  1. Checking that the variables included in all formulas are available in the data
  2. Checking that the formulas provided are in an appropriate form

I am interested in steers on the best way to do 1. and 2.

For 2. I am interested what range of formulas we should accept. For example should we accept strings?

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant