View source: R/local_outliers_ssMRCD.R

local_outliers_ssMRCD | R Documentation |

This function applies the local outlier detection method based on the spatially smoothed MRCD estimator developed in Puchhammer and Filzmoser (2023).

```
local_outliers_ssMRCD(
data,
coords,
N_assignments,
lambda,
weights = NULL,
k = NULL,
dist = NULL
)
```

`data` |
data matrix with measured values. |

`coords` |
matrix of coordinates of observations. |

`N_assignments` |
vector of neighborhood assignments. |

`lambda` |
scalar used for spatial smoothing (see also |

`weights` |
weight matrix used in |

`k` |
integer, if given the |

`dist` |
scalar, if given the neighbors closer than given distance are used for next distances. If |

Returns an object of class `"locOuts"`

with following components:

`outliers` | indices of found outliers. |

`next_distance` | vector of next distances for all observations. |

`cutoff` | upper fence of adjusted boxplot (see `adjbox` ) used as cutoff value for next distances. |

`coords` | matrix of observation coordinates. |

`data` | matrix of observation values. |

`N_assignments` | vector of neighborhood assignments. |

`k, dist` | specifications regarding neighbor comparisons. |

`centersN` | coordinates of centers of neighborhoods. |

`matneighbor` | matrix storing information which observations where used to calculate next distance for each observation (per row). 1 indicates it is used. |

`ssMRCD` | object of class `"ssMRCD"` and output of `ssMRCD` covariance estimation. |

Puchhammer P. and Filzmoser P. (2023): Spatially smoothed robust covariance estimation for local outlier detection. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2305.05371")}

See also functions `ssMRCD, plot.locOuts, summary.locOuts`

.

```
# data construction
data = matrix(rnorm(2000), ncol = 4)
coords = matrix(rnorm(1000), ncol = 2)
N_assignments = sample(1:10, 500, replace = TRUE)
lambda = 0.3
# apply function
outs = local_outliers_ssMRCD(data = data,
coords = coords,
N_assignments = N_assignments,
lambda = lambda,
k = 10)
outs
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.