fdata: Constructs an 'fdata' object

Description Usage Arguments See Also Examples

Description

Calling fdata() constructs an fdata object. Can be called without arguments.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fdata(
  y = matrix(),
  N = 1,
  r = 1,
  S = matrix(),
  bycolumn = TRUE,
  name = character(),
  type = "discrete",
  sim = FALSE,
  exp = matrix(),
  T = matrix()
)

Arguments

y

A matrix containing the observations for finite mixture estimation. Can be by column or row depending on the slot bycolumn.

N

An integer holding the number of observations.

r

An integer defining the dimension of the data. Only for multivariate distributions like normult or studmult the dimension is larger one.

S

A matrix containing the indicators of the data. If the fdata class contains indicators estimation is performed with a fixed indicator approach.

bycolumn

A logical indicating if the data in y and S is sorted by by column (TRUE) or row (FALSE).

name

A character specifying a name for the data. Optional.

type

A character specifying the data type: either discrete for discrete data or continuous for continuous data. The two data types are treated differently when calculating data moments.

sim

A logical indicating, if the data was simulated.

exp

A matrix containing the exposures of Poisson data.

T

A matrix containing the (optional) repetitions of binomial or Poisson data. Must be of type integer.

See Also

fdata class that describes the slots and the getters, setters and and checkers

Examples

1
2
3
4
5
# Call the constructor without arguments.
f_data <- fdata()

# Create simulated data.
f_data <- fdata(y = rpois(100, 312), sim = TRUE)

simonsays1980/finmix documentation built on Dec. 23, 2021, 2:25 a.m.