Use data to compute the min-log-likelihood of choosing a given observed cell given a set of parameters. Should allow the user to estimate the parameters of the model.
Arguments
- data
Data.frame containing at least "id", "time", "x", "y", "goal_x", "goal_y", and "goal_id". If it does not have the utility variables yet, these will add them to the data.frame.
- parameters
Numeric vector or matrix containing the parameters to be used. Should be specified in the same order as specified in
"parameter_names". If a matrix, each row should contain parameters to be estimated for each instance of "id" separately.- parameter_names
Character vector containing the parameters that you want to estimate. Defaults to all parameters defined in
params_from_csv. Whenever not all parameters are used, the excluded parameters are assumed to have a value of 0.- transform
Logical denoting whether to transform the provided parameters from the real axis to the bounded scales imposed on the parameters within
predped. Defaults toTRUE.- bounds
Matrix containing the lower and upper bounds of the parameters in its first and second column respectively. Additionally, rownames should denote for which parameter a certain pair represents the bounds. Only used when
transform = TRUE. Defaults to the default bounds ofpredped.- cpp
Logical denoting whether to use the
mll_rcppfunction to compute the min-log-likelihood. Defaults toTRUE.- summed
Logical denoting whether to sum the min-log-likelihood to one value per person. If
TRUE, you get the resulting summed min-log-likelihood for each individual with a correction to avoid-Infs. IfFALSE, the function will instead return a list of vectors containing the raw likelihoods (not min-log-likelihoods!), allowing users to specify their own corrections (if needed). Defaults toFALSE.- ...
Additional arguments passed on to
add_motion_variables. In a typical estimation situation, these motion variables should already be indata.@return Either named vector containing the summed min-log-likelihood (
summed = TRUE) or named list with vectors of raw likelihoods (summed = FALSE) per person in the dataset.