Skip to content

Commit

Permalink
Rearrange variables in pars list.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomrawson committed Sep 20, 2024
1 parent 97c2437 commit 21df7e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/inputs.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cowflu_inputs <- function(alpha, beta, gamma, sigma, asc_rate, dispersion, inputs) {
c(inputs,
list(alpha = alpha, beta = beta, gamma = gamma, asc_rate = asc_rate, dispersion = dispersion, sigma = sigma))
list(alpha = alpha, beta = beta, gamma = gamma, asc_rate = asc_rate, sigma = sigma, dispersion = dispersion))
}


Expand Down Expand Up @@ -55,6 +55,10 @@ cowflu_fixed_inputs <- function(p_region_export, p_cow_export,
cli::cli_abort(
"Expected 'condition_on_export' to be TRUE or FALSE")
}
if (! likelihood_choice %in% c("incidence", "survival")) {
cli::cli_abort(
"Expected 'likelihood choice' to be 'incidence' or 'survival'")
}
## This line will transpose the matrix, and change the original rows (now columns) to a cumulative sum.
movement_matrix_cumulative <- apply(movement_matrix, 1, cumsum)

Expand All @@ -70,5 +74,6 @@ cowflu_fixed_inputs <- function(p_region_export, p_cow_export,
index = rep(seq_along(n_herds_per_region), n_herds_per_region),
time_test = time_test,
n_test = n_test,
condition_on_export = condition_on_export)
condition_on_export = condition_on_export,
likelihood_choice = likelihood_choice)
}

0 comments on commit 21df7e4

Please sign in to comment.