sscomp: Composition Estimation

View source: R/sscomp.R

sscompR Documentation

Composition Estimation

Description

Estimate composition using multinomial counts.

Usage

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

sscomp2(x,alpha=1.4)

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.

Value

sscomp returns a column of estimated probabilities.

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

References

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


gss documentation built on Oct. 12, 2024, 1:08 a.m.

Related to sscomp in gss...