ipw.mar: Inverse-probability-weighting-based (IPW) abundance...

Description Usage Arguments Details Value References Examples

View source: R/fun.ipw.R

Description

This function is used to calculate the IPW estimate and Wald-type confidence interval of the abundance under the H-A model, as well as the estimates of parameters in the H-A model.

Usage

1
2
ipw.mar(d, K, x = NULL, y, level =0.95,
  beta.initial = NULL)

Arguments

d

a vector, the number of times of being captured.

K

a number, the number of capture occasions.

x

a vector, matrix or data.frame, stands for individual covariates without missingness.

y

a vector, matrix or data.frame, stands for individual covariates with missing values (NA).

level

a number, the nominal confidence level (default: 0.95).

beta.initial

a vector, with the same length as the parameters in H-A model. 0 means that the coefficient is fixed to zero, and non-zero values are seen as initial values when optimizing.

Details

Options d, K, and y are necessary.

Caution should be taken that beta.initial is NULL if all covariates are considered. When some coefficients of always observed covariates are zero, please specify the corresponding components of beta.initial as zero and others as none-zero values.

Value

A list containing the following components:

n.big

the IPW estimate of the abundance.

n.big.se

Std. Error of n.big.

n.big.ci

the confidence interval of the abundance.

beta

the IPW estimates of parameters in the H-A model.

beta.se

Std. Error of beta.

References

Lee, S.-M., W.-H. Hwang, and J. de Dieu Tapsoba (2016). Estimation in closed capture-recapture models when covariates are missing at random. Biometrics 72(4), 1294–1304.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Analysis results of the prinia data set.

attach(prinia)

## Model 4
(ipw4 <- ipw.mar( d = number.of.capture, K=17, x = cbind(1, fat.index, wing.index), y = tail.length,
                  beta.initial = c(-10,  0,  0, 0.1) ) )
## Model 5
(ipw5 <- ipw.mar( d = number.of.capture, K=17, x = cbind(1, fat.index, wing.index), y = tail.length,
                  beta.initial = c(-10,  1,  0, 0.1) ) )
## Model 6
(ipw6 <- ipw.mar( d = number.of.capture, K=17, x = cbind(1, fat.index, wing.index), y = tail.length,
                  beta.initial = c(-10,  0,  1, 0.1) ) )
## Model 7
(ipw7 <- ipw.mar( d = number.of.capture, K=17, x = cbind(1, fat.index, wing.index), y = tail.length,
                  beta.initial = c(-10,  1,  0.5, 0.1) ) )

detach(prinia)

ecnuliuyang/CRAbun documentation built on April 13, 2020, 7:45 p.m.