Constructor functions for Classes in the saemix package
# S4 method for SaemixData
initialize(
.Object,
name.data,
header,
sep,
na,
name.group,
name.predictors,
name.response,
name.covariates,
name.X,
units,
name.mdv,
name.cens,
name.occ,
name.ytype,
verbose = TRUE,
automatic = TRUE
)# S4 method for SaemixRepData
initialize(.Object, data = NULL, nb.chains = 1)
# S4 method for SaemixSimData
initialize(.Object, data = NULL, datasim = NULL)
# S4 method for SaemixModel
initialize(
.Object,
model,
description,
modeltype,
psi0,
name.response,
name.sigma,
transform.par,
fixed.estim,
error.model,
covariate.model,
covariance.model,
omega.init,
error.init,
name.modpar,
verbose = TRUE
)
# S4 method for SaemixRes
initialize(
.Object,
status = "empty",
modeltype,
name.fixed,
name.random,
name.sigma,
fixed.effects,
fixed.psi,
betaC,
betas,
omega,
respar,
cond.mean.phi,
cond.var.phi,
mean.phi,
phi,
phi.samp,
parpop,
allpar,
MCOV
)
# S4 method for SaemixObject
initialize(.Object, data, model, options = list())
an SaemixObject, SaemixRes, SaemixData or SaemixModel object to initialise
name of the dataset (can be a character string giving the name of a file on disk or of a dataset in the R session, or the name of a dataset
whether the dataset/file contains a header. Defaults to TRUE
the field separator character. Defaults to any number of blank spaces ("")
a character vector of the strings which are to be interpreted as NA values. Defaults to c(NA)
name (or number) of the column containing the subject id
name (or number) of the column(s) containing the predictors (the algorithm requires at least one predictor x)
name (or number) of the column containing the response variable y modelled by predictor(s) x
name (or number) of the column(s) containing the covariates, if present (otherwise missing)
name of the column containing the regression variable to be used on the X axis in the plots (defaults to the first predictor)
list with up to three elements, x, y and optionally covariates, containing the units for the X and Y variables respectively, as well as the units for the different covariates (defaults to empty)
name of the column containing the indicator for missing variable
name of the column containing the indicator for censoring
name of the column containing the occasion
name of the column containing the index of the response
a boolean indicating whether messages should be printed out during the creation of the object
a boolean indicating whether to attempt automatic name recognition when some colum names are missing or wrong (defaults to TRUE)
an SaemixData object
number of chains used in the algorithm
dataframe containing the simulated data
name of the function used to compute the structural model. The function should return a vector of predicted values given a matrix of individual parameters, a vector of indices specifying which records belong to a given individual, and a matrix of dependent variables (see example below).
a character string, giving a brief description of the model or the analysis
a character string giving the model used for analysis
a matrix with a number of columns equal to the number of parameters in the model, and one (when no covariates are available) or two (when covariates enter the model) giving the initial estimates for the fixed effects. The column names of the matrix should be the names of the parameters in the model, and will be used in the plots and the summaries. When only the estimates of the mean parameters are given, psi0 may be a named vector.
a vector of character string giving the names of the residual error parameters (defaults to "a" and "b")
the distribution for each parameter (0=normal, 1=log-normal, 2=probit, 3=logit). Defaults to a vector of 1s (all parameters have a log-normal distribution)
whether parameters should be estimated (1) or fixed to their initial estimate (0). Defaults to a vector of 1s
type of residual error model (valid types are constant, proportional, combined and exponential). Defaults to constant
a matrix giving the covariate model. Defaults to no covariate in the model
a square matrix of size equal to the number of parameters in the model, giving the variance-covariance matrix of the model: 1s correspond to estimated variances (in the diagonal) or covariances (off-diagonal elements). Defaults to the identity matrix
a square matrix of size equal to the number of parameters in the model, giving the initial estimate for the variance-covariance matrix of the model. The current default is a diagonal matrix with ones for all transformed parameters as well as for all untransformed parameters with an absolute value smaller than one. For untransformed parameters greater or equal to one, their squared value is used as the corresponding diagonal element.
a vector of size 2 giving the initial value of a and b in the error model. Defaults to 1 for each estimated parameter in the error model
names of the model parameters, if they are not given as the column names (or names) of psi0
string indicating whether a model has been run successfully; set to "empty" at initialisation, used to pass on error messages or fit status
a character string giving the name of the fixed parameters
a character string giving the name of the random parameters
vector with the estimates of h(mu) and betas in estimation order
vector with the estimates of h(mu)
vector with the estimates of betas (estimated fixed effects for covariates)
vector with the estimates of mu
estimated variance-covariance matrix
vector with the estimates of the parameters of the residual error
matrix of size (number of subjects) x (nb of parameters) containing the conditional mean estimates of the, defined as the mean of the conditional distribution
matrix of the variances on cond.mean.phi, defined as the variance of the conditional distribution
matrix of size (number of subjects) x (nb of parameters) giving for each subject the estimates of the population parameters including covariate effects
matrix of size (number of subjects) x (nb of parameters) giving for each subject
samples from the individual conditional distributions of the phi
population parameters at each iteration
all parameters (including covariate effects) at each iteration
design matrix C
a list of options passed to the algorithm
create a SaemixData
object. Please use the saemixData
function.
create a SaemixModel
object Please use the saemixModel
function.
create a SaemixObject
object. This object is obtained after a successful call to
saemix
create a SaemixRepData object
create a SaemixRes object
create a SaemixSimData object