This function calculates the daily correlation values between
the pm25_A
, pm25_B
, humidity
, and temperature
channels. One correlation value for each channel pair will
be returned for each day. A linear fit between channels A and B is also
calculated for each day and the coefficients are returned as the slope and
the intercept.
PurpleAirSoH_dailyCorrelation(pat = NULL, aggregationPeriod = "10 min")
pat | PurpleAir Timeseries pat object. |
---|---|
aggregationPeriod | The period of time over which to aggregate the data. in order to create complete pairs between the A and B channels. If there is not a complete pair, the function will return an "NA" for that day. It is recommended that this value is between "2 min" and "1 hour" The smaller the aggregation period, the longer this function will take to run. The default is set to "10 min" for this reason. |
tbl <- example_pat_failure_A %>% PurpleAirSoH_dailyCorrelation(aggregationPeriod = "30 min") timeseriesTbl_multiPlot( tbl, parameters = c("pm25_A_pm25_B_cor", "temperature_humidity_cor", "pm25_A_temperature_cor"), ylim = c(-1,1), style = "line" )