pat_externalFit: Linear model fitting of PurpleAir and federal PWFSL time...

Description Usage Arguments Value Examples

View source: R/pat_externalFit.R

Description

Produces a linear model between data from PurpleAir and data from the closest PWFSL monitor.

A diagnostic plot is produced if 'showPlot = TRUE'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
pat_externalFit(
  pat = NULL,
  showPlot = TRUE,
  size = 1,
  pa_color = "purple",
  pwfsl_color = "black",
  alpha = 0.5,
  lr_shape = 15,
  lr_color = "black",
  lr_lwd = 1.5,
  lr_lcolor = "tomato",
  lr_lalpha = 0.45,
  ts_shape = 1,
  xylim = NULL,
  channel = "ab",
  replaceOutliers = TRUE,
  qc_algorithm = "hourly_AB_01",
  min_count = 20
)

Arguments

pat

PurpleAir Timeseries pat object.

showPlot

Logical specifying whether to generate a model fit plot.

size

Size of points.

pa_color

Color of hourly points.

pwfsl_color

Color of hourly points.

alpha

Opacity of points.

lr_shape

Symbol to use for linear model points.

lr_color

Color of linear model plot points.

lr_lwd

Width of linear regression line.

lr_lcolor

Color of linear regression line.

lr_lalpha

Opacity of linear regression line.

ts_shape

Symbol to use for time series points.

xylim

Vector of (lo,hi) limits used as limits on the correlation plot axes – useful for zooming in.

channel

Data channel to use for PM2.5 – one of "a", "b or "ab".

replaceOutliers

Logical specifying whether or not to replace outliers.

qc_algorithm

Named QC algorithm to apply to hourly aggregation stats.

min_count

Aggregation bins with fewer than 'min_count' measurements will be marked as 'NA'.

Value

A linear model, fitting the 'pat' PurpleAir readings to the closest PWFSL monitor readings.

Examples

1
2
3

AirSensor documentation built on March 13, 2021, 1:07 a.m.