PGM: Penalized Gaussian Mixtures

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

A density estimation using Penalized Gaussian Mixtures method with Gibbs sampling and Hamiltonian Monte Carlo sampling

Usage

1
PGM(x, K = 35, a0 = min(x), b0 = max(x), iter = 5000, burnin = 1000)

Arguments

x

the sample to be estimated

K

the number of Gaussian distributions to be cumulated

a0

the minimum of the range to estimate the density

b0

the maximum of the range to estimate the density

iter

the number of Gibbs samples

burnin

the number of between-sample random numbers

Value

a list where t represents the possilble values and pgm represents the density of that value

Examples

1
2
3
4
5
6
7
## Not run: 
rnR <- gibbsR(100,10)
par(mfrow=c(2,1));
plot(rnR[,1],type='l')
plot(rnR[,2],type='l')

## End(Not run)

SunJinglan/StatComp21080 documentation built on Dec. 24, 2021, 1:24 a.m.