logLik_from_design_matrix: Compute the log-likelihood from the design matrix

Description Usage Arguments Value See Also Examples

View source: R/fit_model.R

Description

This function is called internally by other functions. It prepares data and calls predictorC_wrap to predict the probability of death and then calls the C++ function compute_logLikC to computes the log-likelihood in C++.

Usage

1
2
logLik_from_design_matrix(data, design_matrix, scale = 1,
  indices = NULL)

Arguments

data

The dataset to be used

design_matrix

The design matrix

scale

The scaling parameter (useful if the optimisation function can only minimise)

indices

The list of indices computed by compute_indices

Value

The scaled log-likelihood.

See Also

predictorC_wrap, compute_logLik

Examples

1
2
3
pmat <- build_param_matrix(param_values = c(0.1, 0.2), param_str = c("w1" = "s"))
dmat <- build_design_matrix(data = SurvEles_small, param_matrix = pmat)
logLik_from_design_matrix(data = SurvEles_small, design_matrix = dmat)

courtiol/SileR documentation built on May 16, 2020, 8:10 p.m.