Influence {HeckmanEM} | R Documentation |
Influence Analysis for the Heckman Selection model
Description
This function conducts influence analysis for a given 'HeckmanEM' object. The influence analysis can be conducted using several types of perturbations (not available for the contaminated Normal model).
Usage
Influence(object, type, colx = NULL, k = 3.5)
Arguments
object |
A 'HeckmanEM' object to perform the analysis on. |
type |
A character string indicating the type of perturbation to perform. The types can be one of "case-weight","scale","response" and"exploratory". |
colx |
Optional integer specifying the position of the column in the
object's matrix |
k |
A positive real constant to be used in the benchmark calculation: |
Value
Returns a list of class HeckmanEM.influence
with the following elements:
M0 |
A vector of length |
benchmark |
|
influent |
A vector with the influential observations' positions. |
type |
The perturbation type. |
Author(s)
Marcos Oliveira
References
Insert any relevant references here.
See Also
Examples
n <- 100
nu <- 3
cens <- 0.25
set.seed(13)
w <- cbind(1, runif(n, -1, 1), rnorm(n))
x <- cbind(w[,1:2])
c <- qt(cens, df = nu)
sigma2 <- 1
beta <- c(1, 0.5)
gamma <- c(1, 0.3, -.5)
gamma[1] <- -c * sqrt(sigma2)
datas <- rHeckman(x, w, beta, gamma, sigma2, rho = 0.6, nu, family = "T")
y <- datas$y
cc <- datas$cc
heckmodel <- HeckmanEM(y, x, w, cc, family = "Normal", iter.max = 50)
global <- CaseDeletion(heckmodel)
plot(global)
local_case <- Influence(heckmodel, type = "case-weight")
local_case$influent # influential values here!
plot(local_case)
local_scale <- Influence(heckmodel, type = "scale")
local_scale$influent # influential values here!
plot(local_scale)
local_response <- Influence(heckmodel, type = "response")
local_response$influent # influential values here!
plot(local_response)
local_explore <- Influence(heckmodel, type = "exploratory", colx = 2)
local_explore$influent # influential values here!
plot(local_explore)