grad_rho: Gradient vector of LCV and LAML wrt rho (log smoothing...

View source: R/RcppExports.R

grad_rhoR Documentation

Gradient vector of LCV and LAML wrt rho (log smoothing parameters)

Description

Gradient vector of LCV and LAML wrt rho (log smoothing parameters)

Usage

grad_rho(
  X_GL,
  GL_temp,
  haz_GL,
  deriv_rho_beta,
  weights,
  tm,
  nb_smooth,
  p,
  n_legendre,
  S_list,
  temp_LAML,
  Vp,
  S_beta,
  beta,
  inverse_new_S,
  X,
  temp_deriv3,
  event,
  expected,
  type,
  Ve,
  mat_temp,
  method
)

Arguments

X_GL

list of matrices (length(X.GL)=n.legendre) for Gauss-Legendre quadrature

GL_temp

list of vectors used to make intermediate calculations and save computation time

haz_GL

list of all the matrix-vector multiplications X.GL[[i]]%*%beta for Gauss Legendre integration in order to save computation time

deriv_rho_beta

firt derivative of beta wrt rho (implicit differentiation)

weights

vector of weights for Gauss-Legendre integration on [-1;1]

tm

vector of midpoints times for Gauss-Legendre integration; tm = 0.5*(t1 - t0)

nb_smooth

number of smoothing parameters

p

number of regression parameters

n_legendre

number of nodes for Gauss-Legendre quadrature

S_list

List of all the rescaled penalty matrices multiplied by their associated smoothing parameters

temp_LAML

temporary matrix used when method="LAML" to save computation time

Vp

Bayesian covariance matrix

S_beta

List such that S_beta[[i]]=S_list[[i]]%*%beta

beta

vector of estimated regression parameters

inverse_new_S

inverse of the penalty matrix

X

design matrix for the model

temp_deriv3

temporary matrix for third derivatives calculation when type="net" to save computation time

event

vector of right-censoring indicators

expected

vector of expected hazard rates

type

"net" or "overall"

Ve

frequentist covariance matrix

mat_temp

temporary matrix used when method="LCV" to save computation time

method

criterion used to select the smoothing parameters. Should be "LAML" or "LCV"; default is "LAML"

Value

List of objects with the following items:

grad_rho

gradient vector of LCV or LAML

deriv_rho_inv_Hess_beta

List of first derivatives of Vp wrt rho

deriv_rho_Hess_unpen_beta

List of first derivatives of the Hessian of the unpenalized log-likelihood wrt rho


survPen documentation built on Sept. 14, 2023, 1:06 a.m.