You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stop(paste("Error: Column(s)", paste(names(column_types[!column_types%in% c("numeric", "integer")]), collapse=", "), "are not numeric or integers in the exposure prior dataframe"))
40
40
}
41
41
42
-
if (data_t$T!= nrow(exp_prior) ) {
42
+
if (T!= nrow(exp_prior) ) {
43
43
warning("Warning: The number of rows in the exposure prior dataframe does not match the number of time points in the study\n")
stop("Biomarker, ", b, ", in `modeldefinition$biomarkers` is not a column of serological data; `",
76
+
stop("Biomarker, ", b, ", in `biomarkers` is not a column of serological data; `",
77
77
paste(data_sero_name, collapse=", "), "`")
78
78
}
79
79
}
80
80
if(!identical(biomarkers_md, biomarkers_obs) ) {
81
-
stop("Biomarkers in observationalModel (", paste(biomarkers_obs, collapse=", "), ") do not match biomarkers in `modeldefinition$biomarkers` (", paste(biomarkers_md, collapse=", "), ")")
81
+
stop("Biomarkers in observationalModel (", paste(biomarkers_obs, collapse=", "), ") do not match biomarkers in `biomarkers` (", paste(biomarkers_md, collapse=", "), ")")
stop("Biomarkers in abkineticsModel (", paste(biomarkers_abkin, collapse=", "), ") do not match biomarkers in `modeldefinition$biomarkers` (", paste(biomarkers_md, collapse=", "), ")")
84
+
stop("Biomarkers in abkineticsModel (", paste(biomarkers_abkin, collapse=", "), ") do not match biomarkers in `biomarkers` (", paste(biomarkers_md, collapse=", "), ")")
stop("Exposure type, ", e, ", in known exposure data.frame column 'exposure_type' (", paste(exposure_type_names, collapse=", "),
96
-
"is not defined in `modeldefinition$exposureTypes` (", paste(exposures_md, collapse=", "), ")")
96
+
"is not defined in `exposureTypes` (", paste(exposures_md, collapse=", "), ")")
97
97
}
98
98
}
99
99
}
100
100
if(!identical(exposures_md, exposures_obs) ) {
101
-
stop("Exposure types in abkineticsModel (", paste(exposures_obs, collapse=", "), ") do not match exposure types in `modeldefinition$exposureTypes` (", paste(exposures_md, collapse=", "), ")")
101
+
stop("Exposure types in abkineticsModel (", paste(exposures_obs, collapse=", "), ") do not match exposure types in `exposureTypes` (", paste(exposures_md, collapse=", "), ")")
102
102
}
103
-
if(is.null(modeldefinition$exposureFitted)) {
104
-
stop("`modeldefinition$exposureFitted` is NULL, please define a biomarker to fit.")
103
+
if(is.null(exposureFitted)) {
104
+
stop("`exposureFitted` is NULL, please define a biomarker to fit.")
105
105
}
106
106
107
-
exposure_fitted<-modeldefinition$exposureFitted
107
+
exposure_fitted<-exposureFitted
108
108
if(!exposure_fitted%in%exposures_md) {
109
-
stop("The fitted exposure type, ", exposure_fitted, ", is not defined in, `modeldefinition$exposureTypes`: ", paste(exposures_md, collapse=", "))
109
+
stop("The fitted exposure type, ", exposure_fitted, ", is not defined in, `exposureTypes`: ", paste(exposures_md, collapse=", "))
#' add_par_df("a_d", -2, 2, "norm", 0, 1), # ab kinetics
119
-
#' add_par_df("b_d", 0, 1, "norm", 0.3, 0.05), # ab kinetics
120
-
#' add_par_df("c_d", 0, 4, "unif", 0, 4) # ab kinetics
118
+
#' addPrior("a_d", -2, 2, "norm", 0, 1), # ab kinetics
119
+
#' addPrior("b_d", 0, 1, "norm", 0.3, 0.05), # ab kinetics
120
+
#' addPrior("c_d", 0, 4, "unif", 0, 4) # ab kinetics
121
121
#' )
122
122
#' )
123
123
#'
@@ -134,12 +134,12 @@ NULL
134
134
#' \describe{
135
135
#' \item{names}{Unique identifier for each biomarker.}
136
136
#' \item{model}{Description of the model using the \code{makeModel} and \code{addObservationalModel} functions.}
137
-
#' \item{prior}{Description of the prior distribution using the \code{add_par_df} function.}
137
+
#' \item{prior}{Description of the prior distribution using the \code{addPrior} function.}
138
138
#' }
139
139
#'
140
140
#' @details Add more data about this model here.
141
141
#'
142
-
#' @seealso \code{\link{makeModel}}, \code{\link{addObservationalModel}}, \code{\link{add_par_df}}, for related functions.
142
+
#' @seealso \code{\link{makeModel}}, \code{\link{addObservationalModel}}, \code{\link{addPrior}}, for related functions.
143
143
#'
144
144
#' @examples
145
145
#' # Example usage. This describes the observation model for a SARS-CoV-2 delta wave using IgG data. First define the log likelihood function, which is cauchy, with a LOD at a titre value of log10(40):
@@ -157,7 +157,7 @@ NULL
157
157
#' observationalModel <- list(
158
158
#' names = c("IgG"),
159
159
#' model = makeModel(addObservationalModel("IgG", c("sigma"), obsFunction)),
0 commit comments