localinfmeas: Local influence measures.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/localinfmeasfin.R

Description

It computes some measures and plots to asses the local influence of outliers in the SAEM spatial estimation for censored spatial observations, for six types of covariance functions (est$type): "exponential", "matern", "gauss", "spherical","powered.exponential" or "stable" and "cauchy".

Usage

1
localinfmeas(est, fix.nugget = T, diag.plot = T, type.plot = "all", c = 3)

Arguments

est

object of the class "SAEMSpatialCens". See SAEMSCL function.

fix.nugget

(logical) it indicates if the τ^2 parameter must be fixed.

diag.plot

(logical) it indicates if diagnostic plots must be showed.

type.plot

type of plot (all: all graphics, rp: response perturbation,smp: scale matrix perturbation, evp: explanatory variable perturbation).

c

constant used for fixing the limit of detection (benchmark value).

Details

this function uses the Maximum likelihood expectation (MLE) under three perturbation schemes (response, scale matrix and explanatory variables perturbations) to detect the influence of outliers in the SAEM estimation procedure.

Value

in addition to the diagnostic graphics (response, scale matrix and explanatory variable schemes, respectively), the function returns the next values.

Qwrp

negative Qw0 matrix under the response perturbation scheme.

Qwsmp

negative Qw0 matrix under the scale matrix perturbation scheme.

Qwevp

negative Qw0 matrix under the explanatory variable perturbation scheme.

respper

data.frame containing an indicator of the presence of atypical values and the M(0) values for the response perturbation scheme.

smper

data.frame containing an indicator of the presence of atypical values and the M(0) values for the scale matrix perturbation scheme.

expvper

data.frame containing an indicator of the presence of atypical values and the M(0) values for the explanatory variable perturbation scheme.

limrp

limit of detection for outliers for the response perturbation scheme.

limsmp

limit of detection for outliers for the scale matrix perturbation scheme.

limevp

limit of detection for outliers for the explanatory variable perturbation scheme.

Author(s)

Alejandro Ordonez <<[email protected]>>, Victor H. Lachos <<[email protected]>> and Christian E. Galarza <<[email protected]>>

Maintainer: Alejandro Ordonez <<[email protected]>>

References

Cook, R. D. (1986). Assessment of local influence. Journal of the Royal Statistical Society, Series B,, 48, 133-169.

Zhu, H., Lee, S., Wei, B. & Zhou, J. (2001). Case-deletion measures for models with incomplete data. Biometrika, 88, 727-737.

See Also

SAEMSCL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
## Not run: 
require(geoR)

data("Missouri")
data=Missouri
data$V3=log((data$V3))
cc=data$V5
y=data$V3
n=127
k=1
datare1=data
coords=datare1[,1:2]
data1=data.frame(coords,y)
data1=data1[cc==0,]
geodata=as.geodata(data1,y.col=3,coords.col=1:2)
v=variog(geodata)
v1=variofit(v)
cov.ini=c(0,2)
est=SAEMSCL(cc,y,cens.type="left",trend="cte",coords=coords,M=15,perc=0.25,
MaxIter=5,pc=0.2,cov.model="exponential",fix.nugget=T,nugget=2,
inits.sigmae=cov.ini[2],inits.phi=cov.ini[1], search=T,lower=0.00001,upper=100)


w=localinfmeas(est,fix.nugget=T,c=3)

res=w$respper
res[res[,1]=="atypical obs",]

sm=w$smper
sm[sm[,1]=="atypical obs",]

ev=w$expvper
ev[ev[,1]=="atypical obs",]


##############ANOTHER EXAMPLE#########

n<-200 ### sample size for estimation
n1=100 ### number of observation used in the prediction

###simulated coordinates
r1=sample(seq(1,30,length=400),n+n1)
r2=sample(seq(1,30,length=400),n+n1)
coords=cbind(r1,r2)

coords1=coords[1:n,]

cov.ini=c(0.2,0.1)
type="exponential"
xtot=as.matrix(rep(1,(n+n1)))
xobs=xtot[1:n,]
beta=5

###simulated data
obj=rspacens(cov.pars=c(3,.3,0),beta=beta,x=xtot,coords=coords,cens=0.25,n=(n+n1),
n1=n1,cov.model=type,cens.type="left")

data2=obj$datare
cc=obj$cc
y=obj$datare[,3]

##### generating atypical observations###
y[91]=y[91]+4
y[126]=y[126]+4
y[162]=y[162]+4
coords=obj$datare[,1:2]

###initial values###
cov.ini=c(0.2,0.1)

est=SAEMSCL(cc,y,cens.type="left",trend="cte",coords=coords,M=15,perc=0.25,
MaxIter=10,pc=0.2,cov.model=type,fix.nugget=T,nugget=0,inits.sigmae=cov.ini[1],
inits.phi=cov.ini[2],search=T,lower=0.00001,upper=50)


w=localinfmeas(est,fix.nugget=T,c=3)

res=w$respper
res[res[,1]=="atypical obs",]

sm=w$smper
sm[sm[,1]=="atypical obs",]

ev=w$expvper
ev[ev[,1]=="atypical obs",]


## End(Not run)

CensSpatial documentation built on May 30, 2017, 8:24 a.m.