fmrs.gendata-methods: fmrs.gendata method

Description Usage Arguments Value Author(s) See Also Examples

Description

Generates a data set from Finite Mixture of AFT regression models or Finite Mixture of Regression models under the specified setting.

Usage

1
2
3
4
5
fmrs.gendata(nObs, nComp, nCov, coeff, dispersion, mixProp, rho, umax, ...)

## S4 method for signature 'ANY'
fmrs.gendata(nObs, nComp, nCov, coeff, dispersion, mixProp, rho,
  umax, disFamily = "lnorm")

Arguments

nObs

A numeric value represents sample size

nComp

A numeric value represents the order mixture in FMRs model

nCov

A numeric value represents the number of covariates in design matrix

coeff

A vector of all regression coefficients including intercepts. It must be a vector of length nComp *(nCov+1).

dispersion

A vector of positive values for dispersion parameters of sub-distributions in FMRs models

mixProp

A vector of mixing proportions which their sum must be one

rho

A numeric value in [-1, 1] which represents the correlation between covariates of design matrix

umax

A numeric value represents the upper bound in Uniform distribution for censoring

...

Other possible options

disFamily

A sub-distribution family. The options are "norm" for FMR models, "lnorm" for mixture of AFT regression models with Log-Normal sub-distributions,"weibull" for mixture of AFT regression models with Weibull sub-distributions

Value

A list including reponse, covariates and cenroing variables

Author(s)

Farhad Shokoohi <shokoohi@icloud.com>

See Also

Other lnorm..norm..weibull: fmrs.mle, fmrs.tunsel, fmrs.varsel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
set.seed(1980)
nComp = 2
nCov = 10
nObs = 500
REP = 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")

Example output

fmrs package, Version 1.0.9, Released 2016-07-01
Provides parameter estimation as well as variable selection in
    Finite Mixture of Accelerated Failure Time Regression and Finite
    Mixture of Regression Models.
    Furthermore, this package provides Ridge Regression and Elastic Net.
BugReports: https://github.com/shokoohi/fmrs/issues

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