mixProp-methods: mixProp method

Description Usage Arguments Value Author(s) Examples

Description

Provides the estimated mixing proportions of an FMRs model form an fmrsfit-class

Usage

1
2
3
4
mixProp(object, ...)

## S4 method for signature 'fmrsfit'
mixProp(object, ...)

Arguments

object

An fmrsfit-class

...

Other possible arguments

Value

A numeric vector of length-nComp

Author(s)

Farhad Shokoohi <shokoohi@icloud.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
set.seed(1980)
nComp = 2
nCov = 10
nObs = 500
dispersion = c(1, 1)
mixProp = c(0.4, 0.6)
rho = 0.5
coeff1 = c( 2,  2, -1, -2, 1, 2, 0, 0,  0, 0,  0)
coeff2 = c(-1, -1,  1,  2, 0, 0, 0, 0, -1, 2, -2)
umax = 40

dat <- fmrs.gendata(nObs = nObs, nComp = nComp, nCov = nCov,
                     coeff = c(coeff1, coeff2), dispersion = dispersion,
                     mixProp = mixProp, rho = rho, umax = umax,
                     disFamily = "lnorm")

res.mle <- fmrs.mle(y = dat$y, x = dat$x, delta = dat$delta,
                   nComp = nComp, disFamily = "lnorm",
                   initCoeff = rnorm(nComp*nCov+nComp),
                   initDispersion = rep(1, nComp),
                   initmixProp = rep(1/nComp, nComp))
mixProp(res.mle)

fmrs documentation built on May 2, 2019, 4:18 a.m.