Skip to contents

Estimate coefficients of a polynomial in Exponential-based model: $$\mathrm{poly}(x; \alpha) \mathrm{Exp}(x; \lambda)$$, where \(\alpha\) is a coefficient vector, \(\lambda\) is a rate parameter of an exponential distribution: $$\mathrm{Exp}(x; \lambda) := \lambda e^{-\lambda x}$$.

Using data and optionally its frequencies freq, and a degree of a polynomial, a rate parameter lmd of an exponential distribution, it computes the coefficients of polynomial, along with Akaike Information Criterion(AIC) and an accuracy information from underlying SDP solver. In general, the smaller the AIC is, the better the model is. An accuracy around 1e-7 is a good indication for a computational result of coefficients estimation.

Usage

exp_est(deg, lmd, data, freq, verbose, stepvec)

Arguments

deg

A degree of polynomial, which is positive even integer.

lmd

A rate parameter of an exponential distribution, which is positive.

data

A numeric vector of a data set to be estimated.

freq

A numeric vector of frequencies for a data set data. The default value is NULL, which indicates that all frequencies are equally one. If freq is not NULL, then it should be the same length as data, and all values should be positive integers.

verbose

If TRUE, it shows a detail information about SDP solver.

stepvec

It designates the stepsize for SDP solver. If the problem is easy, i.e., the number of a data set are small and a degree of a polynomial is small, then, for example, 0.9 might be ok. If it looks difficult, then c(0.5, 0.3) might work.

Value

A list of deg, lmd, aic, accuracy, coefficient vector

Examples

rlst <- exp_est(3, 1.0, mixexpgamma$n200, NULL, FALSE, c(0.7, 0.4))
#> Status: Normal Termination.