[R] {car} outlierTest looses p/q values
Phil
chobophil at gmail.com
Fri Oct 17 12:53:30 CEST 2014
Hi guys,
I came across a strange phenomena and can't figure out why it happens by
myself so here we go.
I got a dataframe which consists of double numbers which I want to
check, row-wise if there are outliers in the rows.
So I iterate over the rows and create a glm using the numbers of that
particular row. Which might look like this:
case1)
x1 x2 x3 x4 x5 x6 x7
x8 x9 x10 x11
0.00 3.91 0.00 0.00 0.00 68.03 40.39 0.00
0.00 0.00 4.11
or like this:
case2)
x1 x2 x3 x4 x5 x6 x7
x8 x9 x10 x11
1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
1.00 1.00 5.34
or any other combination of double numbers...
however, using a glm like this:
glModel <- glm(vector ~ some_other_meta_data_which_is_double_numbers)
and testing it with:
test.Res <- outlierTest(glModel,digits=4,cutoff=Inf,n.max=Inf)
I always get a result consisting of the desired p and q values but not
if the vector I use looks like case2. There is no error message and the
computation does not stop either.
However, all p and q values are produced except for the last value x11.
Any idea why this particular value gets dropped from the output of the
outlierTest Method in the car package.
Here is the sessioninfo:
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-redhat-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8
[7] LC_PAPER=en_US.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_1.0.0 car_2.0-21 RColorBrewer_1.0-5 iNEXT_1.0
[5] vegan_2.0-10 lattice_0.20-29 permute_0.8-3
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 compiler_3.1.1 digest_0.6.4 grid_3.1.1
[5] gtable_0.1.2 labeling_0.3 MASS_7.3-33 munsell_0.4.2
[9] nnet_7.3-8 plyr_1.8.1 proto_0.3-10 Rcpp_0.11.2
[13] reshape2_1.4 scales_0.2.4 stringr_0.6.2 tools_3.1.1
Any help is highly appreciated.
Thanks
Phil
More information about the R-help
mailing list