fit_data {LATERmodel} | R Documentation |
Fit a LATER model to a single dataset or a pair of datasets.
Description
Fit a LATER model to a single dataset or a pair of datasets.
Usage
fit_data(
data,
share_a = FALSE,
share_sigma = FALSE,
share_sigma_e = FALSE,
with_early_component = FALSE,
intercept_form = FALSE,
use_minmax = FALSE,
fit_criterion = "likelihood",
jitter_settings = list(n = 7, prop = 0.5, seed = NA, processes = 2)
)
Arguments
data |
A data frame with columns |
share_a , share_sigma , share_sigma_e |
If |
with_early_component |
If |
intercept_form |
If |
use_minmax |
If |
fit_criterion |
String indicating the criterion used to optimise the fit by seeking its minimum.
|
jitter_settings |
Settings for running the fitting multiple times with randomly-generated offsets ('jitter') applied to the starting estimates.
|
Value
A list of fitting arguments and outcomes.
-
fitted_params
is a named list of fitted parameter values. -
named_fit_params
is a data frame with rows given by the dataset names and columns given by the parameter names. -
loglike
is the overall log-likelihood of the fit. -
aic
is the "Akaike's 'An Information Criterion'" value for the model. -
optim_result
is the raw output fromstats::optim
for the best fit. -
jitter_optim_results
contains the raw output from each call tostats::optim
for the different start points.
Examples
data <- data.frame(name = "test", promptness = rnorm(100, 3, 1))
data_other <- data.frame(name = "test_2", promptness = rnorm(100, 1, 1))
fit_shared_sigma <- fit_data(
data = rbind(data, data_other), share_sigma = TRUE
)