diff --git a/man/covprod.Rd b/man/covprod.Rd index 04c922356458ef97e771abb6d8bde393f952bdc2..9542cd7328b1c4d5f01dd42a36492bbe59e39555 100644 --- a/man/covprod.Rd +++ b/man/covprod.Rd @@ -14,7 +14,11 @@ covprod(A, res, W) \item{W}{A matrix of weights.} } \description{ -Compute the cross-covariance matrix between covariance and regression parameters. -Equation (11) of Bonat and Jorgensen (2015). +Compute the cross-covariance matrix between covariance + and regression parameters. Equation (11) of Bonat and Jorgensen + (2015). +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_bias_corrected_std.Rd b/man/mc_bias_corrected_std.Rd index 0a1b6d2178540985421090b607f1315829d920f0..2283397d4a06d3058d3dbc6e4e0a7ae8e6c5f7db 100644 --- a/man/mc_bias_corrected_std.Rd +++ b/man/mc_bias_corrected_std.Rd @@ -9,15 +9,21 @@ mc_bias_corrected_std(object, id) \arguments{ \item{object}{An object of mcglm class.} -\item{id}{a vector which identifies the clusters. The length and order of id should be the -same as the number of observations. Data are assumed to be sorted so that observations on a cluster -are contiguous rows for all entities in the formula.} +\item{id}{a vector which identifies the clusters. The length and +order of id should be the same as the number of +observations. Data are assumed to be sorted so that observations +on a cluster are contiguous rows for all entities in the formula.} } \value{ -A matrix. Note that the function assumes that the data are in the correct order. +A matrix. Note that the function assumes that the data are in + the correct order. } \description{ -Compute bias-corrected standard error for regression parameters in the context -of clustered observations. It is also robust and has improved finite sample properties. +Compute bias-corrected standard error for regression + parameters in the context of clustered observations. It is also + robust and has improved finite sample properties. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_build_C.Rd b/man/mc_build_C.Rd index ba76088e0d8a7f499dd4933e8534151cf4c33b7a..5c7823df235ec9b49e8d2cbf15caf44a52579a2b 100644 --- a/man/mc_build_C.Rd +++ b/man/mc_build_C.Rd @@ -11,7 +11,8 @@ mc_build_C(list_mu, list_Ntrial, rho, list_tau, list_power, list_Z, list_sparse, \arguments{ \item{list_mu}{A list with values of the mean.} -\item{list_Ntrial}{A list with the number of trials. Usefull only for binomial responses.} +\item{list_Ntrial}{A list with the number of trials. Usefull only for +binomial responses.} \item{rho}{Vector of correlation parameters.} @@ -19,28 +20,38 @@ mc_build_C(list_mu, list_Ntrial, rho, list_tau, list_power, list_Z, list_sparse, \item{list_power}{A list with values for the power parameters.} -\item{list_Z}{A list of matrix to be used in the matrix linear predictor.} +\item{list_Z}{A list of matrix to be used in the matrix linear +predictor.} \item{list_sparse}{A list with Logical.} -\item{list_variance}{A list specifying the variance function to be used for each response variable.} +\item{list_variance}{A list specifying the variance function to be +used for each response variable.} -\item{list_covariance}{A list specifying the covariance function to be used for each response variable.} +\item{list_covariance}{A list specifying the covariance function to be +used for each response variable.} -\item{list_power_fixed}{A list of Logical specifying if the power parameters are fixed or not.} +\item{list_power_fixed}{A list of Logical specifying if the power +parameters are fixed or not.} \item{compute_C}{Logical. Compute or not the C matrix.} -\item{compute_derivative_beta}{Logical. Compute or not the derivative of C with respect to regression parameters.} +\item{compute_derivative_beta}{Logical. Compute or not the derivative +of C with respect to regression parameters.} -\item{compute_derivative_cov}{Logical. Compute or not the derivative of C with respect the covariance parameters.} +\item{compute_derivative_cov}{Logical. Compute or not the derivative + of C with respect the covariance parameters.} } \value{ -A list with the inverse of the C matrix and the derivatives of the C matrix with respect to -rho, power and tau parameters. +A list with the inverse of the C matrix and the derivatives of + the C matrix with respect to rho, power and tau parameters. } \description{ -This function builds the joint variance-covariance matrix using the Generalized -Kronecker product and its derivatives with respect to rho, power and tau parameters. +This function builds the joint variance-covariance matrix + using the Generalized Kronecker product and its derivatives with + respect to rho, power and tau parameters. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_build_bdiag.Rd b/man/mc_build_bdiag.Rd index 091f765704f3a134b6c0a83c37e92bd576386a3a..c931eee2e3331bb14558eb82e896f829f0f2a32d 100644 --- a/man/mc_build_bdiag.Rd +++ b/man/mc_build_bdiag.Rd @@ -9,16 +9,21 @@ mc_build_bdiag(n_resp, n_obs) \arguments{ \item{n_resp}{A numeric specifyng the number of response variables.} -\item{n_obs}{A numeric specifying the number of observations in the data set.} +\item{n_obs}{A numeric specifying the number of observations in the +data set.} } \value{ A list of zero matrices. } \description{ -Build a block-diagonal matrix of zeros. Such functions is used when computing -the derivatives of the Cholesky decomposition of C. +Build a block-diagonal matrix of zeros. Such functions + is used when computing the derivatives of the Cholesky + decomposition of C. } \details{ It is an internal function. } +\author{ +Wagner Hugo Bonat +} diff --git a/man/mc_build_omega.Rd b/man/mc_build_omega.Rd index 31da4325a2b15cb49b22fbd64ab025dd9da614dd..3022c922caa92c69c38098903643e1315701a102 100644 --- a/man/mc_build_omega.Rd +++ b/man/mc_build_omega.Rd @@ -11,14 +11,21 @@ mc_build_omega(tau, Z, covariance_link, sparse = FALSE) \item{Z}{A list of matrices.} -\item{covariance_link}{String specifing the covariance link function: identity, inverse, expm.} +\item{covariance_link}{String specifing the covariance link function: +identity, inverse, expm.} -\item{sparse}{Logical force to use sparse matrix representation 'dsCMatrix'.} +\item{sparse}{Logical force to use sparse matrix representation +'dsCMatrix'.} } \value{ -A list with the \eqn{\Omega} matrix its inverse and derivatives with respect to \eqn{\tau}. +A list with the \eqn{\Omega} matrix its inverse and + derivatives with respect to \eqn{\tau}. } \description{ -This function build \eqn{\Omega} matrix according the covariance link function. +This function build \eqn{\Omega} matrix according the + covariance link function. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_build_sigma.Rd b/man/mc_build_sigma.Rd index 7178e91e154d0745941ad946c080fc23cd41da27..644ab33178a18c7c6e0e4adde4a8ec6ae2399ec6 100644 --- a/man/mc_build_sigma.Rd +++ b/man/mc_build_sigma.Rd @@ -8,41 +8,51 @@ mc_build_sigma(mu, Ntrial = 1, tau, power, Z, sparse, variance, covariance, power_fixed, compute_derivative_beta = FALSE) } \arguments{ -\item{mu}{A numeric vector. In general the output from \code{\link{mc_link_function}}.} +\item{mu}{A numeric vector. In general the output from +\code{\link{mc_link_function}}.} -\item{Ntrial}{A numeric vector, or NULL or a numeric specifing the number of trials in the binomial -experiment. It is usefull only when using variance = binomialP or binomialPQ. In the other cases +\item{Ntrial}{A numeric vector, or NULL or a numeric specifing the +number of trials in the binomial experiment. It is usefull only +when using variance = binomialP or binomialPQ. In the other cases it will be ignored.} \item{tau}{A numeric vector.} -\item{power}{A numeric or numeric vector. It should be one number for all variance functions except -binomialPQ, in that case the argument specifies both p and q.} +\item{power}{A numeric or numeric vector. It should be one number for +all variance functions except binomialPQ, in that case the +argument specifies both p and q.} \item{Z}{A list of matrices.} \item{sparse}{Logical.} -\item{variance}{String specifing the variance function: constant, tweedie, poisson_tweedie, -binomialP or binomialPQ.} +\item{variance}{String specifing the variance function: constant, +tweedie, poisson_tweedie, binomialP or binomialPQ.} -\item{covariance}{String specifing the covariance function: identity, inverse or expm.} +\item{covariance}{String specifing the covariance function: identity, +inverse or expm.} -\item{power_fixed}{Logical if the power parameter is fixed at initial value (TRUE). In the case -power_fixed = FALSE the power parameter will be estimated.} +\item{power_fixed}{Logical if the power parameter is fixed at initial +value (TRUE). In the case power_fixed = FALSE the power parameter +will be estimated.} -\item{compute_derivative_beta}{Logical. Compute or not the derivative with respect to regression parameters.} +\item{compute_derivative_beta}{Logical. Compute or not the derivative +with respect to regression parameters.} } \value{ -A list with the Cholesky decomposition of \eqn{\Sigma}, \eqn{\Sigma^{-1}} and the derivative -of \eqn{\Sigma} with respect to the power and tau parameters. +A list with the Cholesky decomposition of \eqn{\Sigma}, + \eqn{\Sigma^{-1}} and the derivative of \eqn{\Sigma} with respect + to the power and tau parameters. } \description{ -This function builds a variance-covariance matrix, based on the variance function and -omega matrix. +This function builds a variance-covariance matrix, based + on the variance function and omega matrix. +} +\author{ +Wagner Hugo Bonat } \seealso{ -\code{\link{mc_link_function}}, \code{\link{mc_variance_function}}, -\code{\link{mc_build_omega}}. +\code{\link{mc_link_function}}, + \code{\link{mc_variance_function}}, \code{\link{mc_build_omega}}. } diff --git a/man/mc_build_sigma_between.Rd b/man/mc_build_sigma_between.Rd index 033a43401ae5a489c0255d5e82b4cc9cd9d9ba28..a5469f8b8cb49662e3a94daea2750fae0e69d87e 100644 --- a/man/mc_build_sigma_between.Rd +++ b/man/mc_build_sigma_between.Rd @@ -14,13 +14,16 @@ mc_derivative_sigma_between(n_resp) \item{n_resp}{A numeric.} -\item{inverse}{Logical} +\item{inverse}{Logical.} } \value{ A list with sigmab and its derivatives with respect to rho. } \description{ -This function builds the correlation matrix between response variable, its inverse and -derivatives. +This function builds the correlation matrix between + response variable, its inverse and derivatives. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_core_pearson.Rd b/man/mc_core_pearson.Rd index f7b1bcf3a0af821a74c9f4f9603f8e6024755da6..8c48d3524f86fd92263a9fe52df98d9ff28080ae 100644 --- a/man/mc_core_pearson.Rd +++ b/man/mc_core_pearson.Rd @@ -22,4 +22,7 @@ Core of the Pearson estimating function. \details{ It is an internal function. } +\author{ +Wagner Hugo Bonat +} diff --git a/man/mc_correction.Rd b/man/mc_correction.Rd index a24379d92bdde9919386b3324992026b9f905ceb..1a744733fb6e4389e684124ccfdd264484457c49 100644 --- a/man/mc_correction.Rd +++ b/man/mc_correction.Rd @@ -9,20 +9,28 @@ mc_correction(D_C, inv_J_beta, D, inv_C) \arguments{ \item{D_C}{A list of matrices.} -\item{inv_J_beta}{A matrix. In general it is computed based on the output of the -\code{[mcglm]{mc_quasi_score}}.} +\item{inv_J_beta}{A matrix. In general it is computed based on the +output of the \code{[mcglm]{mc_quasi_score}}.} -\item{D}{A matrix. In general it is the output of the \link{mc_link_function}.} +\item{D}{A matrix. In general it is the output of the +\link{mc_link_function}.} -\item{inv_C}{A matrix. In general the output of the \link{mc_build_C}.} +\item{inv_C}{A matrix. In general the output of the +\link{mc_build_C}.} } \value{ -A vector with the correction terms to be used on the Pearson estimating function. +A vector with the correction terms to be used on the Pearson + estimating function. } \description{ -Compute the correction term associated with the Pearson estimating function. +Compute the correction term associated with the Pearson + estimating function. } \details{ -It is an internal function useful inside the fitting algorithm. +It is an internal function useful inside the fitting + algorithm. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_cross_sensitivity.Rd b/man/mc_cross_sensitivity.Rd index 68f9247eb227014e1436b70942780ba807aec226..ede94bfa205d49ef40aa9931fa9fa670b523406c 100644 --- a/man/mc_cross_sensitivity.Rd +++ b/man/mc_cross_sensitivity.Rd @@ -12,13 +12,19 @@ mc_cross_sensitivity(Product_cov, Product_beta, \item{Product_beta}{A list of matrices.} -\item{n_beta_effective}{Numeric. Effective number of regression parameters.} +\item{n_beta_effective}{Numeric. Effective number of regression +parameters.} } \value{ -The cross-sensitivity matrix. Equation (10) of Bonat and Jorgensen (2015). +The cross-sensitivity matrix. Equation (10) of Bonat and + Jorgensen (2015). } \description{ -Compute the cross-sensitivity matrix between regression and covariance parameters. -Equation 10 of Bonat and Jorgensen (2015). +Compute the cross-sensitivity matrix between regression + and covariance parameters. Equation 10 of Bonat and Jorgensen + (2015). +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_cross_variability.Rd b/man/mc_cross_variability.Rd index 219c0aa9932b80011328f04608ce19b59924c6cf..a976a2afb0c85be2d483ec07ebdc3c4e428ff3d4 100644 --- a/man/mc_cross_variability.Rd +++ b/man/mc_cross_variability.Rd @@ -16,9 +16,14 @@ mc_cross_variability(Product_cov, inv_C, res, D) \item{D}{A matrix.} } \value{ -The cross-variability matrix between regression and covariance parameters. +The cross-variability matrix between regression and + covariance parameters. } \description{ -Compute the cross-variability matrix between covariance and regression parameters. +Compute the cross-variability matrix between covariance + and regression parameters. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_derivative_C_rho.Rd b/man/mc_derivative_C_rho.Rd index b683cf6f5d980f0928d8d895fc70537d9b61469a..854631347d9edefc7033f256692f70ab070b88d9 100644 --- a/man/mc_derivative_C_rho.Rd +++ b/man/mc_derivative_C_rho.Rd @@ -20,9 +20,14 @@ mc_derivative_C_rho(D_Sigmab, Bdiag_chol_Sigma_within, A matrix. } \description{ -Compute the derivative of the C matrix with respect to the correlation parameters rho. +Compute the derivative of the C matrix with respect to + the correlation parameters rho. } \details{ -It is an internal function used to build the derivatives of the C matrix. +It is an internal function used to build the derivatives of + the C matrix. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_derivative_cholesky.Rd b/man/mc_derivative_cholesky.Rd index 7d7264c14e13e83826bb79a78052c74d1024684e..d6e5b22d14b3d61a5033e9aaf73567b44069e552 100644 --- a/man/mc_derivative_cholesky.Rd +++ b/man/mc_derivative_cholesky.Rd @@ -17,9 +17,13 @@ mc_derivative_cholesky(derivada, inv_chol_Sigma, chol_Sigma) A list of matrix. } \description{ -This function compute the derivative of the Cholesky decomposition. +This function compute the derivative of the Cholesky + decomposition. } \details{ It is an internal function. } +\author{ +Wagner Hugo Bonat +} diff --git a/man/mc_derivative_expm.Rd b/man/mc_derivative_expm.Rd index ff8de831d5603c0fb7168b4d1ef772e4b6c1f557..478c8bff8ece46a474b8e7ac2cada564551f4604 100644 --- a/man/mc_derivative_expm.Rd +++ b/man/mc_derivative_expm.Rd @@ -23,15 +23,20 @@ mc_derivative_expm(dU, UU, inv_UU, Q, n = dim(UU)[1], sparse = FALSE) A matrix. } \description{ -Compute the derivative of the exponential-matrix covariance link function. +Compute the derivative of the exponential-matrix + covariance link function. } \details{ -Many arguments required by this function are provide by the \code{link[mcglm]{mc_dexpm}}. -The argument dU is the derivative of the U matrix with respect to the models parameters. It should -be computed by the user. +Many arguments required by this function are provide by the + \code{link[mcglm]{mc_dexpm}}. The argument dU is the derivative + of the U matrix with respect to the models parameters. It should + be computed by the user. +} +\author{ +Wagner Hugo Bonat } \seealso{ -\code{\link[Matrix]{expm}}, \code{link[mcglm]{mc_dexp_gold}} and -\code{link[mcglm]{mc_dexpm}}. +\code{\link[Matrix]{expm}}, \code{link[mcglm]{mc_dexp_gold}} + and \code{link[mcglm]{mc_dexpm}}. } diff --git a/man/mc_derivative_sigma_beta.Rd b/man/mc_derivative_sigma_beta.Rd index 88554679af7970c264a9c8df515fe9b7e51eb5af..a822978e8b20011a0328a5e2df5330310813ce54 100644 --- a/man/mc_derivative_sigma_beta.Rd +++ b/man/mc_derivative_sigma_beta.Rd @@ -18,11 +18,14 @@ mc_derivative_sigma_beta(D, D_V_sqrt_mu, Omega, V_sqrt, variance) \item{variance}{A string specifying the variance function name.} } \value{ -A list of matrices, containg the derivatives of V^{1/2} with respect to the regression -parameters. +A list of matrices, containg the derivatives of \eqn{V^{1/2}} + with respect to the regression parameters. } \description{ -Compute the derivatives of V^{1/2} matrix with respect to the regression -parameters beta. +Compute the derivatives of \eqn{V^{1/2}} matrix with + respect to the regression parameters beta. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_dexp_gold.Rd b/man/mc_dexp_gold.Rd index 174642287aad7168da3793aea84f59b47173466e..2cda4e26ac3a2507cff2774e134f424a7bd19d5c 100644 --- a/man/mc_dexp_gold.Rd +++ b/man/mc_dexp_gold.Rd @@ -15,16 +15,21 @@ mc_dexp_gold(M, dM) A list with two elements: \eqn{expm(M)} and its derivatives. } \description{ -Given a matrix \eqn{M} and its derivative \eqn{dM} the function \code{dexp_gold} -returns the exponential-matrix \eqn{expm(M)} and its derivative. This function is based on -the \code{\link[Matrix]{expm}} function. It is not really used in the package, but I keep this -function to test my own implementation based on eigen values decomposition. +Given a matrix \eqn{M} and its derivative \eqn{dM} the + function \code{dexp_gold} returns the exponential-matrix + \eqn{expm(M)} and its derivative. This function is based on the + \code{\link[Matrix]{expm}} function. It is not really used in the + package, but I keep this function to test my own implementation + based on eigen values decomposition. } \examples{ M <- matrix(c(1,0.8,0.8,1), 2,2) dM <- matrix(c(0,1,1,0),2,2) mcglm::mc_dexp_gold(M = M, dM = dM) } +\author{ +Wagner Hugo Bonat +} \seealso{ \code{\link[Matrix]{expm}}, \code{\link[base]{eigen}}. } diff --git a/man/mc_expm.Rd b/man/mc_expm.Rd index 0ede4aa9f94ec6c81280554e6e7034d5e83b99cb..b454c0ba57fee272fd3b162f50182f1c0b2266a7 100644 --- a/man/mc_expm.Rd +++ b/man/mc_expm.Rd @@ -9,25 +9,32 @@ mc_expm(U, n = dim(U)[1], sparse = FALSE, inverse = FALSE) \arguments{ \item{U}{A matrix.} -\item{n}{A number specifing the dimension of the matrix U. Default \code{n = dim(U)[1]}.} +\item{n}{A number specifing the dimension of the matrix U. Default +\code{n = dim(U)[1]}.} -\item{sparse}{Logical defining the class of the output matrix. If \code{sparse = TRUE} the output -class will be 'dgCMatrix' if \code{sparse = FALSE} the class will be 'dgMatrix'.} +\item{sparse}{Logical defining the class of the output matrix. If +\code{sparse = TRUE} the output class will be 'dgCMatrix' if +\code{sparse = FALSE} the class will be 'dgMatrix'.} -\item{inverse}{Logical defining if the inverse will be computed or not.} +\item{inverse}{Logical defining if the inverse will be computed or +not.} } \value{ -A list with \eqn{\Omega = expm(U)} its inverse (if \code{inverse = TRUE}) and -auxiliares matrices to compute the derivatives. +A list with \eqn{\Omega = expm(U)} its inverse (if + \code{inverse = TRUE}) and auxiliares matrices to compute the + derivatives. } \description{ Given a matrix \code{U} the function \code{mc_expm} -returns the exponential-matrix \eqn{expm(U)} and some auxiliares matrices to compute -its derivatives. This function is based on the eigen-value decomposition it means that it is -very slow. + returns the exponential-matrix \eqn{expm(U)} and some auxiliares + matrices to compute its derivatives. This function is based on + the eigen-value decomposition it means that it is very slow. +} +\author{ +Wagner Hugo Bonat } \seealso{ \code{\link[Matrix]{expm}}, \code{\link[base]{eigen}}, -\code{link[mcglm]{mc_dexp_gold}}. + \code{link[mcglm]{mc_dexp_gold}}. } diff --git a/man/mc_getInformation.Rd b/man/mc_getInformation.Rd index e1c04d7335edfafb3ec1e5fb038ed1c8dfb59a7e..866b02de4d0166e17c2ee98c0fde5dc43ae7b081 100644 --- a/man/mc_getInformation.Rd +++ b/man/mc_getInformation.Rd @@ -9,14 +9,20 @@ mc_getInformation(list_initial, list_power_fixed, n_resp) \arguments{ \item{list_initial}{A list of initial values.} -\item{list_power_fixed}{A list of logical specyfing if the power parameters should be estimated or not.} +\item{list_power_fixed}{A list of logical specyfing if the power +parameters should be estimated or not.} \item{n_resp}{A number specyfing the nmber of response variables.} } \value{ -The number of \eqn{\beta}'s, \eqn{\tau}'s, power and correlation parameters. +The number of \eqn{\beta}'s, \eqn{\tau}'s, power and + correlation parameters. } \description{ -This computes all information required about the number of model parameters. +This computes all information required about the number + of model parameters. +} +\author{ +Wagner Hugo Bonat } diff --git a/man/mc_link_function.Rd b/man/mc_link_function.Rd index 1434211d3e8bbc9a9e786fc52a3c2154193624d9..730cedf16e132fe53dc5d4c43280c553ba101585 100644 --- a/man/mc_link_function.Rd +++ b/man/mc_link_function.Rd @@ -39,44 +39,57 @@ mc_inverse(beta, X, offset) \arguments{ \item{beta}{A numeric vector of regression parameters.} -\item{X}{A design matrix, see \code{\link[stats]{model.matrix}} for details.} +\item{X}{A design matrix, see \code{\link[stats]{model.matrix}} for +details.} -\item{offset}{A numeric vector of offset values. It will be sum up on the linear predictor as a -covariate with known regression parameter equals one (\eqn{\mu = g^{-1}(X\beta + offset)}). -If no offset is present in the model, set offset = NULL.} +\item{offset}{A numeric vector of offset values. It will be sum up on +the linear predictor as a covariate with known regression +parameter equals one (\eqn{\mu = g^{-1}(X\beta + offset)}). If +no offset is present in the model, set offset = NULL.} -\item{link}{A string specifing the name of the link function. mcglm implements the following -link functions: logit, probit, cauchit, cloglog, loglog, identity, log, sqrt, 1/mu^2 and inverse.} +\item{link}{A string specifing the name of the link function. mcglm +implements the following link functions: logit, probit, cauchit, +cloglog, loglog, identity, log, sqrt, 1/mu^2 and inverse.} } \value{ -A list with two elements: mu and D. +A list with two elements: mu and D. } \description{ The \code{mc_link_function} is a customized call of the \code{\link[stats]{make.link}} function. -Given the name of a link function, it returns a list with two elements. -The first element is the inverse of the link function applied on the linear predictor -\eqn{\mu = g^{-1}(X\beta).} The second element is the derivative of mu with respect to the regression -parameters \eqn{\beta}. It will be useful when computing the quasi-score function. + +Given the name of a link function, it returns a list with two +elements. The first element is the inverse of the link function +applied on the linear predictor \eqn{\mu = g^{-1}(X\beta).} The +second element is the derivative of mu with respect to the regression +parameters \eqn{\beta}. It will be useful when computing the +quasi-score function. } \details{ -The link function is an important component of the multivariate covariance generalized -linear model, since it link the expectation of the response variable with the covariates. -Let \eqn{\beta} a \eqn{p x 1} regression parameter vector and \eqn{X} an -\eqn{n x p} design matrix. The expected value of a response variable \eqn{Y} is given by -\deqn{E(Y) = g^{-1}(X\beta),} where \eqn{g} is the link function and \eqn{\eta = X\beta} -is the linear predictor. Let \eqn{D} be a \eqn{n \times p} -matrix whose entries are given by the derivatives of \eqn{mu} with respect to \eqn{\beta}. -Such matrix will be required by the fitting algorithm. The function \code{mc_link_function} returns -a list where the first element is mu (n x 1) vector and the second D (n x p) matrix. +The link function is an important component of the + multivariate covariance generalized linear model, since it link + the expectation of the response variable with the covariates. + Let \eqn{\beta} a \eqn{p x 1} regression parameter vector and + \eqn{X} an \eqn{n x p} design matrix. The expected value of a + response variable \eqn{Y} is given by \deqn{E(Y) = + g^{-1}(X\beta),} where \eqn{g} is the link function and \eqn{\eta + = X\beta} is the linear predictor. Let \eqn{D} be a \eqn{n \times + p} matrix whose entries are given by the derivatives of \eqn{mu} + with respect to \eqn{\beta}. Such matrix will be required by the + fitting algorithm. The function \code{mc_link_function} returns a + list where the first element is mu (n x 1) vector and the second + D (n x p) matrix. } \examples{ x1 <- seq(-1, 1, l = 5) X <- model.matrix(~ x1) -mc_link_function(beta = c(1,0.5), X = X, offset = NULL, link = 'log') -mc_link_function(beta = c(1,0.5), X = X, offset = rep(10,5), link = 'identity') +mc_link_function(beta = c(1,0.5), X = X, + offset = NULL, link = 'log') +mc_link_function(beta = c(1,0.5), X = X, + offset = rep(10,5), link = 'identity') } \seealso{ -\code{\link[stats]{model.matrix}}, \code{\link[stats]{make.link}}. +\code{\link[stats]{model.matrix}}, + \code{\link[stats]{make.link}}. } diff --git a/man/mc_sandwich.Rd b/man/mc_sandwich.Rd index f59c67b792a82f58723117028ac37c8b95b4d333..eb9b731fe5c9d09f02546299b8800288584d5239 100644 --- a/man/mc_sandwich.Rd +++ b/man/mc_sandwich.Rd @@ -1,25 +1,10 @@ % Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/mc_auxiliar.R \name{mc_sandwich} -\alias{mc_multiply} -\alias{mc_multiply2} \alias{mc_sandwich} -\alias{mc_sandwich_cholesky} -\alias{mc_sandwich_negative} -\alias{mc_sandwich_power} \title{Matrix product in sandwich form} \usage{ mc_sandwich(middle, bord1, bord2) - -mc_sandwich_negative(middle, bord1, bord2) - -mc_sandwich_power(middle, bord1, bord2) - -mc_sandwich_cholesky(bord1, middle, bord2) - -mc_multiply(bord1, bord2) - -mc_multiply2(bord1, bord2) } \arguments{ \item{middle}{A matrix.} @@ -32,9 +17,14 @@ mc_multiply2(bord1, bord2) The matrix product bord1*middle*bord2. } \description{ -The function \code{mc_sandwich} is just an auxiliar function to compute product matrix -in the sandwich form bord1*middle*bord2. An special case appears when computing the derivative of -the covariance matrix with respect to the power parameter. Always the bord1 and bord2 should be -diagonal matrix. If it is not true, this product is too slow. +The function \code{mc_sandwich} is just an auxiliar + function to compute product matrix in the sandwich form + bord1*middle*bord2. An special case appears when computing the + derivative of the covariance matrix with respect to the power + parameter. Always the bord1 and bord2 should be diagonal + matrix. If it is not true, this product is too slow. +} +\author{ +Wagner Hugo Bonat }