% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/comparisons.R
\name{citizenair_compare}
\alias{citizenair_compare}
\title{Compare citizen data to official data}
\usage{
citizenair_compare(x, reference = "official", sensor = "citizen")
}
\arguments{
\item{x}{a data.frame with columns time/group/value}

\item{reference}{a character string of length 1 indicating in the \code{group} column of \code{x} what is the reference value.
Defaults to 'official'}

\item{sensor}{a character string of length 1 indicating in the \code{group} column of \code{x} what is the comparison value.
Defaults to 'citizen'}
}
\value{
an object of class \code{citizenair_comparison_ircel} which is a list with elements
\enumerate{
\item{data: the data containing columns time, REF, SENSOR, OLSQ, lower_CI, upper_CI, lower_PI, upper_PI and e}
\item{model: an object of class lm represendint the model SENSOR ~ REF}
\item{overview: a data.frame with columns statistic, time, REF, SENSOR, OLSQ, lower_CI, upper_CI, lower_PI, upper_PI and e with the
minimum/Q25/median/mean/Q75/max for each of these columns as well as the number of valid data points and the number of NA values}
}
}
\description{
Compare citizen data to official data
}
\examples{
x <- data.frame(
  time = rep(seq.Date(from = Sys.Date()-364, to = Sys.Date(), by = "day"), 2), 
  group = sample(c("official", "citizen"), size = 365*2, replace = TRUE), 
  value = rnorm(365*2))
comparison <- citizenair_compare(x, reference = "official", sensor = "citizen")
plot(comparison)
}
