Skip to content

vaccineff 0.0.4

Latest
Compare
Choose a tag to compare
@davidsantiagoquevedo davidsantiagoquevedo released this 23 Sep 08:26
· 5 commits to main since this release

{vaccineff 0.0.4} simplifies data handling by using linelist objects. Tags are assigned to the outcome, censoring, and vaccine dates using the function make_vaccineff_data, reducing redundancy in function input parameters.

The new pipeline includes the following three functions and complementary methods: summary and plot.

  • make_vaccineff_data: This function returns an S3 object of the class vaccineff_data with the study's relevant information. It also allows the creation of a matched cohort to control for confounding variables by setting match = TRUE and passing the appropriate exact and nearest arguments. The method summary() can be used to check cohort characteristics, matching balance, and the sizes of matched, excluded, and removed populations.

  • plot_coverage: This function returns a plot of the vaccine coverage or cumulative coverage. If the population is matched, the plot includes the resulting count of doses after matching.

  • effectiveness: This function provides methods for estimating VE using the $HR$. A summary of the estimation is available via summary(), and a graphical representation of the methodology is generated by plot().

Breaking changes

The following functions are no longer accessible to users, but they are called within make_vaccineff_data():

  • make_immunization()
  • match_cohort()

The plot() method returns log-log and survival type plots when receiving an object of type effectiveness. This deprecates the functions plot_survival() and plot_loglog().

Get started with {vaccineff 0.0.4}

# Create `vaccineff_data`
vaccineff_data <- make_vaccineff_data(
  data_set = cohortdata,
  outcome_date_col = "death_date",
  censoring_date_col = "death_other_causes",
  vacc_date_col = "vaccine_date_2",
  vaccinated_status = "v",
  unvaccinated_status = "u",
  immunization_delay = 15,
  end_cohort = as.Date("2044-12-31"),
  match = TRUE,
  exact = c("age", "sex"),
  nearest = NULL
)

# Print summary of vaccineff data object
summary(vaccineff_data)

# Plot the vaccine coverage of the total population
plot_coverage(vaccineff_data)

# Estimate the Vaccine Effectiveness at 90 days
ve90 <- effectiveness(vaccineff_data, at = 90)

# Print summary of VE
summary(ve90)

# Loglog plot to check proportional hazards
plot(ve90, type = "loglog")