-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcovert_raw_to_risk.Rd
38 lines (35 loc) · 1.23 KB
/
covert_raw_to_risk.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_economics_methods.R
\name{covert_raw_to_risk}
\alias{covert_raw_to_risk}
\title{Convert Raw Outcomes to Risk}
\usage{
covert_raw_to_risk(object, outcomes_raw, model_cases_sample_mean)
}
\arguments{
\item{object}{An object containing UK population data.}
\item{outcomes_raw}{A data frame containing raw outcome data.}
\item{model_cases_sample_mean}{A data frame containing model cases sample mean.}
}
\value{
A data frame with calculated risk metrics for each age group and outcome.
}
\description{
This function converts raw outcome data to risk metrics based on population data and model cases sample mean.
}
\details{
The function performs the following steps:
\itemize{
\item Extracts population and age group data from the input object.
\item Defines helper functions to check the completeness of data and calculate risk per infection.
\item Checks that each outcome has data for all age groups.
\item Combines raw outcomes data with model cases data and population data.
\item Calculates the risk per infection for each outcome and age group.
}
}
\examples{
\dontrun{
result <- covert_raw_to_risk(object, outcomes_raw, model_cases_sample_mean)
print(result)
}
}