your data looks something like this:
x = rep(1:7, c(3, 4,17, 21, 48, 118, 93))
y = c(
rep(1:7,c(1,2,0,0,0,0,0)),
rep(1:7,c(2,0,1,1,0,0,0)),
rep(1:7,c(10,3,2,1,0,0,1)),
rep(1:7,c(15,3,1,1,1,0,0)),
rep(1:7,c(20,10,2,10,3,2,1)),
rep(1:7,c(40,20,20,30,3,4,1)),
rep(1:7,c(50,25,10,5,3,0,0))
)
the plot:
library(car)
sp(x,y, jitter = list(x=0.8, y=0.8), smoother=F, reg.line = F)
If you just want to know whether a given value is an outlier in your data (i.e. a univariate outlier analysis), you can use:
library(outliers)
grubbs.test(x)
or simply use boxplot
which values are plotted as outliers:
boxplot(x, plot=F)$out
If you need multivariate outliers, you can use the mvoutlier
package
(see functions ?chisq.plot
and ?pcout
):
library(mvoutlier)
pcout(x=data.frame(x,y))