add.p.values.Rd 831 B

12345678910111213141516171819202122232425
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/hypoAfrica.R
  3. \name{add.p.values}
  4. \alias{add.p.values}
  5. \title{Add statistical significance to df/dfRef difference using binomial distribution}
  6. \usage{
  7. add.p.values(df, dfRef, var, timeVar = "visitid", nVar = "total")
  8. }
  9. \arguments{
  10. \item{df}{data frame with target variable var, timeVar and count variable nVar}
  11. \item{dfRef}{a reference data frame of the same shape as df}
  12. \item{var}{the target variable}
  13. \item{timeVar}{variable indicating comparable visits}
  14. \item{nVar}{count variable}
  15. }
  16. \value{
  17. data frame with var_p column of calculated signficance of difference (binom.test) and boolean var_s column notifying statistical significance at 0.05 level
  18. }
  19. \description{
  20. Add statistical significance to df/dfRef difference using binomial distribution
  21. }