checkMIS: Function to check/report missing values in paired comparison...

Description Usage Arguments Value See Also Examples

View source: R/checkMIS.R

Description

For a given paired comparisons data set the function calculates and prints the number of missing comparisons and the number of times objects are missing. It can also be used to avoid failure of nonresponse-parameter for nonresponse models in

Usage

1
checkMIS(obj, nitems, MISmodel="obj", obj.names = NULL, verbose = FALSE)

Arguments

obj

dataframe or datafile path/name (like pattPC.fit).

nitems

the number of compared objects, not the number of comparisons (like pattPC.fit).

MISmodel

specifies the nonresponse model, either obj (default) for missing mechanisms based on objects, or comp based on comparisons. This argument is only relevant for the (invisible) output of checkMIS.

obj.names

character vector with names for objects.

verbose

if TRUE printed output, otherwise only invisible output to be used, e.g., in the specification of MISalpha and MISbeta in pattPC.fit.

Value

a logical vector (returned invisibly) specifying for which object/comparison there are NA responses in the data (obj).

See Also

pattPC.fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# no missing NAs in dataset dat4
checkMIS(dat4, nitems = 4, verbose = TRUE)

# generates data set with three items and some missing values in
# comparison (23), column 3, then there are no NAs for object 1
data3 <- dat4[, 1:3]
idx3  <- sample(1:100, 10)
data3[idx3,3] <- NA
checkMIS(data3, nitems = 3, verbose = TRUE)

# estimate MCAR PC pattern model for data3 with NA indicators alpha1
# cannot be estimated being accomodated by using checkMIS
pattPC.fit(data3, nitems = 3, MISalpha = checkMIS(data3, nitems = 3))

prefmod documentation built on May 29, 2017, 6:43 p.m.

Search within the prefmod package
Search all R packages, documentation and source code