grpintprob: Compute Probabilities of an Observation Falling into a...

Description Usage Arguments Value Examples

View source: R/grpintprob.R

Description

Compute probabilities of an observation falling into a grouping interval when given component distribution which the observation comes from.

Usage

1
grpintprob(mixdat, mixpar, dist, constr)

Arguments

mixdat

a data frame containing grouped data, whose first column should be right boundaries of grouping intervals where the first and last intervals are open-ended; whose second column should consist of the frequencies indicating numbers of observations falling into each interval.

mixpar

a data frame containing the parameter values of component distributions, which are, in order, the proportions, means, and standard deviations.

dist

the distribution of components, it can be one of "norm", "lnorm", "gamma", "weibull", "binom", "nbinom" and "pois".

constr

a list of constraints on parameters of component distributions.

Value

It produces a matrix, whose each column contains the probabilities of the observations from one component falling into each grouping interval.

Examples

1
2
3
data(bindat)
data(binpar)
grpintprob(bindat, binpar, "binom", mixconstr(consigma = "BINOM", size = c(20, 20, 20, 20)))

mixdist documentation built on May 2, 2019, 3:34 p.m.

Related to grpintprob in mixdist...