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

Integration in Newman Equation #16

Open
nickbrazeau opened this issue Jun 23, 2023 · 0 comments
Open

Integration in Newman Equation #16

nickbrazeau opened this issue Jun 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nickbrazeau
Copy link
Collaborator

Currently in the get_newman_transmissiblity function, I am assuming an exponential distribution for the integration.

Could consider doing an empiric pdf adapting the code below:

  empiricPDF <- function(fs, fspred, N) {
    densfx <- stats::density(fs,
                             bw = 1, # individual counts
                             kernel = "epanechnikov",
                             from = 0, to = N)
    # Evaluate the approx PDF at a specific point
    out <- densfx$y[which.min(abs(densfx$x - fspred))] # use which.min to identify the index of the closest value, which is then taken from density y
    return(out/sum(densfx$y))
  }


@nickbrazeau nickbrazeau added the enhancement New feature or request label Jun 23, 2023
@nickbrazeau nickbrazeau changed the title Newman Integration Equation Integration in Newman Equation Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant