Learn R Programming

gss (version 2.2-8)

sscomp: Composition Estimation

Description

Estimate composition using multinomial counts.

Usage

sscomp(x,wt=rep(1,length(x)),alpha=1.4)

sscomp2(x,alpha=1.4)

Value

sscomp returns a column of estimated probabilities.

sscomp2 returns a matrix of estimated probabilities, matching the input x in dimensions.

Arguments

x

Numerical vector or matrix of multinomial counts.

wt

Numerical vector of integration weights.

alpha

Parameter defining cross-validation score for smoothing parameter selection.

Details

sscomp takes a vector x to estimate composition using density estimation on a nominal discrete domain; zero counts must be included in x to specify the domain. wt mimicking the shape of the unknown density could improve performance.

sscomp2 takes a matrix x, collapses columns to estimate a density using sscomp, then using that as wt in further sscomp calls to estimate composition for each column.

References

Gu, C. (2020), Composition estimation via shrinkage. manuscript.