devtools::load_all() library(MathematicaVsRData) library(OutlierIdentifiers)
qrObj <- QRMonUnit( dfTemperatureData ) %>% QRMonQuantileRegression( df = 12, probabilities = 0.5 ) %>% QRMonPlot( datePlotQ = TRUE ) %>% QRMonErrorsPlot( relativeErrorsQ = FALSE )
dfOutliers1 <- qrObj %>% QRMonFindAnomaliesByResiduals( threshold = 5, relativeErrorsQ = FALSE ) %>% QRMonTakeValue
ggplot(dfTemperatureData) + geom_point( aes( x = Time, y = Temperature ), color = "gray" ) + geom_point( data = dfOutliers1, aes( x = Regressor, y = Value ), color = "red" )
dfOutliers2 <- qrObj %>% QRMonFindAnomaliesByResiduals( threshold = NULL, #outlierIdentifier = function(x) TopOutlierPosition( x, identifier = SPLUSQuartileIdentifierParameters ), outlierIdentifier = NULL, relativeErrorsQ = FALSE ) %>% QRMonTakeValue
ggplot(dfTemperatureData) + geom_point( aes( x = Time, y = Temperature ), color = "gray" ) + geom_point( data = dfOutliers2, aes( x = Regressor, y = Value ), color = "red" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.