View source: R/extended_s3_methods.R
logLik.drift_dm | R Documentation |
This method extracts the log-likelihood for a drift_dm
object, ensuring
data is available and evaluating the model if necessary.
## S3 method for class 'drift_dm'
logLik(object, ...)
object |
a drift_dm object containing observed data |
... |
additional arguments |
A logLik
object containing the log-likelihood value for the
drift_dm object. This value has attributes for the number of
observations (nobs
) and the number of model parameters (df
).
Returns NULL
if observed data is not available.
# get a pre-built model and a data set for demonstration purpose
# (when creating the model, set the discretization to reasonable values)
a_model <- dmc_dm(t_max = 1.5, dx = .0025, dt = .0025)
obs_data(a_model) <- dmc_synth_data
# calculate the log-likelihood
logLik(a_model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.