Learn R Programming

yaImpute (version 1.0-32)

mostused: Tabulate references most often used in imputation

Description

Provides a matrix of reference observations that are used most often as sources of imputation and a column of the counts. The observations are listed in sorted order, most often used first.

Usage

mostused(object,n=20,kth=NULL)

Arguments

object

(1) a data frame created by foruse, or (2) an object created by yai in which case foruse is called automatically.

n

the number of mostused in sorted order.

kth

passed to foruse, if called.

Author

Nicholas L. Crookston ncrookston.fs@gmail.com
Andrew O. Finley finleya@msu.edu

See Also

yai

Examples

Run this code
require(yaImpute)

data(iris)

# form some test data
refs=sample(rownames(iris),50)
x <- iris[,1:3]      # Sepal.Length Sepal.Width Petal.Length
y <- iris[refs,4:5]  # Petal.Width Species

# build a yai object using mahalanobis
mal <- yai(x=x,y=y,method="mahalanobis")

mostused(mal,kth=1)

Run the code above in your browser using DataLab