R/RcppExports.R

Defines functions hpc_estimation acd_estimation mcd_estimation

Documented in acd_estimation hpc_estimation mcd_estimation

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#'@title Fit Joint Mean-Covariance Models based on MCD
#'@description Fit joint mean-covariance models based on MCD.
#'@param m an integer vector of numbers of measurements for subject.
#'@param Y a vector of responses for all subjects.
#'@param X model matrix for the mean structure model.
#'@param Z model matrix for the diagonal matrix.
#'@param W model matrix for the lower triangular matrix.
#'@param start starting values for the parameters in the model.
#'@param mean when covonly is true, it is used as the given mean.
#'@param trace the values of the objective function and the parameters are
#'       printed for all the trace'th iterations.
#'@param profile whether parameters should be estimated sequentially using the
#'       idea of profile likelihood or not.
#'@param errormsg whether or not the error message should be print.
#'@param covonly estimate the covariance structure only, and use given mean.
#'@param optim_method optimization method, choose "default" or "BFGS"(vmmin in
#'       R).
#'@seealso \code{\link{acd_estimation}} for joint mean covariance model fitting
#'         based on ACD, \code{\link{hpc_estimation}} for joint mean covariance
#'         model fitting based on HPC.
#'@export
mcd_estimation <- function(m, Y, X, Z, W, start, mean, trace = FALSE, profile = TRUE, errormsg = FALSE, covonly = FALSE, optim_method = "default") {
    .Call('_jmcm_mcd_estimation', PACKAGE = 'jmcm', m, Y, X, Z, W, start, mean, trace, profile, errormsg, covonly, optim_method)
}

#'@title Fit Joint Mean-Covariance Models based on ACD
#'@description Fit joint mean-covariance models based on ACD.
#'@param m an integer vector of numbers of measurements for subject.
#'@param Y a vector of responses for all subjects.
#'@param X model matrix for the mean structure model.
#'@param Z model matrix for the diagonal matrix.
#'@param W model matrix for the lower triangular matrix.
#'@param start starting values for the parameters in the model.
#'@param mean when covonly is true, it is used as the given mean.
#'@param trace the values of the objective function and the parameters are
#'       printed for all the trace'th iterations.
#'@param profile whether parameters should be estimated sequentially using the
#'       idea of profile likelihood or not.
#'@param errormsg whether or not the error message should be print.
#'@param covonly estimate the covariance structure only, and use given mean.
#'@param optim_method optimization method, choose "default" or "BFGS"(vmmin in
#'       R).
#'@seealso \code{\link{mcd_estimation}} for joint mean covariance model fitting
#'         based on MCD, \code{\link{hpc_estimation}} for joint mean covariance
#'         model fitting based on HPC.
#'@export
acd_estimation <- function(m, Y, X, Z, W, start, mean, trace = FALSE, profile = TRUE, errormsg = FALSE, covonly = FALSE, optim_method = "default") {
    .Call('_jmcm_acd_estimation', PACKAGE = 'jmcm', m, Y, X, Z, W, start, mean, trace, profile, errormsg, covonly, optim_method)
}

#'@title Fit Joint Mean-Covariance Models based on HPC
#'@description Fit joint mean-covariance models based on HPC.
#'@param m an integer vector of numbers of measurements for subject.
#'@param Y a vector of responses for all subjects.
#'@param X model matrix for the mean structure model.
#'@param Z model matrix for the diagonal matrix.
#'@param W model matrix for the lower triangular matrix.
#'@param start starting values for the parameters in the model.
#'@param mean when covonly is true, it is used as the given mean.
#'@param trace the values of the objective function and the parameters are
#'       printed for all the trace'th iterations.
#'@param profile whether parameters should be estimated sequentially using the
#'       idea of profile likelihood or not.
#'@param errormsg whether or not the error message should be print.
#'@param covonly estimate the covariance structure only, and use given mean.
#'@param optim_method optimization method, choose "default" or "BFGS"(vmmin in
#'       R).
#'@seealso \code{\link{mcd_estimation}} for joint mean covariance model fitting
#'         based on MCD, \code{\link{acd_estimation}} for joint mean covariance
#'         model fitting based on ACD.
#'@export
hpc_estimation <- function(m, Y, X, Z, W, start, mean, trace = FALSE, profile = TRUE, errormsg = FALSE, covonly = FALSE, optim_method = "default") {
    .Call('_jmcm_hpc_estimation', PACKAGE = 'jmcm', m, Y, X, Z, W, start, mean, trace, profile, errormsg, covonly, optim_method)
}

Try the jmcm package in your browser

Any scripts or data that you put into this service are public.

jmcm documentation built on Jan. 16, 2021, 5:32 p.m.