aout.pois: Find alpha-outliers in Poisson count data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/aout.pois.R

Description

Given the parameters of a Poisson distribution, aout.pois identifies α-outliers in a given data set.

Usage

1
aout.pois(data, param, alpha = 0.1, hide.outliers = FALSE)

Arguments

data

a vector. The data set to be examined.

param

a vector. Contains the parameter of the Poisson distribution: λ.

alpha

an atomic vector. Determines the maximum amount of probability mass the outlier region may contain. Defaults to 0.1.

hide.outliers

boolean. Returns the outlier-free data if set to TRUE. Defaults to FALSE.

Value

Data frame of the input data and an index named is.outlier that flags the outliers with TRUE. If hide.outliers is set to TRUE, a simple vector of the outlier-free data.

Author(s)

A. Rehage

See Also

dpois

Examples

1
aout.pois(data = c(discoveries), param = median(discoveries), alpha = 0.01)

Example output

Loading required package: Rsolnp
Loading required package: nleqslv
Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

    data is.outlier
1      5      FALSE
2      3      FALSE
3      0      FALSE
4      2      FALSE
5      0      FALSE
6      3      FALSE
7      2      FALSE
8      3      FALSE
9      6      FALSE
10     1      FALSE
11     2      FALSE
12     1      FALSE
13     2      FALSE
14     1      FALSE
15     3      FALSE
16     3      FALSE
17     3      FALSE
18     5      FALSE
19     2      FALSE
20     4      FALSE
21     4      FALSE
22     0      FALSE
23     2      FALSE
24     3      FALSE
25     7      FALSE
26    12       TRUE
27     3      FALSE
28    10       TRUE
29     9       TRUE
30     2      FALSE
31     3      FALSE
32     7      FALSE
33     7      FALSE
34     2      FALSE
35     3      FALSE
36     3      FALSE
37     6      FALSE
38     2      FALSE
39     4      FALSE
40     3      FALSE
41     5      FALSE
42     2      FALSE
43     2      FALSE
44     4      FALSE
45     0      FALSE
46     4      FALSE
47     2      FALSE
48     5      FALSE
49     2      FALSE
50     3      FALSE
51     3      FALSE
52     6      FALSE
53     5      FALSE
54     8      FALSE
55     3      FALSE
56     6      FALSE
57     6      FALSE
58     0      FALSE
59     5      FALSE
60     2      FALSE
61     2      FALSE
62     2      FALSE
63     6      FALSE
64     3      FALSE
65     4      FALSE
66     4      FALSE
67     2      FALSE
68     2      FALSE
69     4      FALSE
70     7      FALSE
71     5      FALSE
72     3      FALSE
73     3      FALSE
74     0      FALSE
75     2      FALSE
76     2      FALSE
77     2      FALSE
78     1      FALSE
79     3      FALSE
80     4      FALSE
81     2      FALSE
82     2      FALSE
83     1      FALSE
84     1      FALSE
85     1      FALSE
86     2      FALSE
87     1      FALSE
88     4      FALSE
89     4      FALSE
90     3      FALSE
91     2      FALSE
92     1      FALSE
93     4      FALSE
94     1      FALSE
95     1      FALSE
96     1      FALSE
97     0      FALSE
98     0      FALSE
99     2      FALSE
100    0      FALSE

alphaOutlier documentation built on May 30, 2017, 8:11 a.m.