Uses a linear model to fit data from channel B to data from channel A.

A diagnostic plot is produced if showPlot = TRUE.

pat_internalFit(
pat = NULL,
showPlot = TRUE,
size = 1,
a_color = "red",
b_color = "blue",
alpha = 0.25,
lr_shape = 15,
lr_color = "black",
lr_lwd = 1.5,
lr_lcolor = "tomato",
lr_lalpha = 0.45,
ts_shape = 1,
xylim = NULL
)

## Arguments

pat PurpleAir Timeseries pat object. Logical specifying whether to generate a model fit plot. Size of points. Color of time series channel A points. Color of time series channel B points. Opacity of points. Symbol to use for linear regression points. Color of linear regression points. Width of linear regression line. Color of linear regression line. Opacity of linear regression line. Symbol to use for time series points. Vector of (lo,hi) limits used as limits on the correlation plot axes -- useful for zooming in.

## Value

A linear model, fitting the pat B channel readings to A channel readings.

## Examples

library(AirSensor)

example_pat %>%
pat_internalFit()
#> Warning: Removed 19592 rows containing non-finite values (stat_smooth).#> Warning: Removed 19592 rows containing non-finite values (stat_smooth).#> Warning: Removed 19592 rows containing missing values (geom_point).#> Warning: Removed 19592 rows containing missing values (geom_point).