reusableDataForGLoMoSampling: Calculate GLoMo data that is usable for repeated 'completing'...

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

View source: R/GLoMo.r

Description

Calculate GLoMo data that is usable for repeated 'completing' of the same data row.

Usage

1
reusableDataForGLoMoSampling(glomo, dfr, forrows = seq(nrow(dfr)), guiddata = NULL, verbosity = 0)

Arguments

glomo

GLoMo object

dfr

data.frame or numdfr that needs to be 'completed'.

forrows

which of the rows in dfr need completion (defaults to all of them)

guiddata

"GuidData" class object for the rows in question, or character vector of uids for those rows, or NULL

verbosity

The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output)

Value

A list of class "ReusableDataForGLoMoSampling", holding items:

guiddata

like to the return value of getGuidData

forrows

copy of the forrows that was passed in the function

perrow

list that holds one item of class "ReusableDataForGLoMoSamplingForOneRow" per element of forrows

The structure of lists of class "ReusableDataForGLoMoSamplingForOneRow" is like this:

a

See "Analysis of Incomplete Multivariate Data" around p349

useSigma

covariance for missing continuous values of that row

sigLeft

See "Analysis of Incomplete Multivariate Data" around p349

probs

conditional probabilities of each 'cell' (see the members of guiddata)

whichCntColNotNA

within the continuous columns, the how manieth of them was not NA for this row

whichCntColNA

within the continuous columns, the how manieth of them was NA for this row

presentCntColsInDfr

column indices within dfr of the continuous columns that did not have NA for this row

missingCntColsInDfr

column indices within dfr of the continuous columns that had NA for this row

Note

This method is mainly present because of predict.conditional.GLoMo, where there is repeated sampling from the same row.

Author(s)

Nick Sabbe ([email protected])

References

"Analysis of Incomplete Multivariate Data" around p349, and also "Statistical Analysis with Missing Values"

See Also

GLoMo-package, NumDfr, predict.conditional.GLoMo

Examples

1
2
3
4
5
6
7
8
9
iris.md<-randomNA(iris, 0.1)
iris.md.nd<-numdfr(iris.md)
mdrow<-min(which(apply(iris.md, 1, function(currow){any(is.na(currow))})))
iris.nd.rnd<-rCatsAndCntInDfr(iris.md.nd, orgriName=NULL, verbosity=1)
iris.weights<-iris.nd.rnd$weights
iris.nd.rnd<-iris.nd.rnd[,1:5]
iris.glomo<-GLoMo(iris.nd.rnd, weights=iris.weights, verbosity=1)
reusableDataForGLoMoSampling(glomo=iris.glomo, dfr=iris.md.nd, forrows = mdrow,
	verbosity = 1)

GLoMo documentation built on May 31, 2017, 3:35 a.m.