| loglike_defm | R Documentation |
Log-Likelihood of DEFM
loglike_defm(m, par, as_log = TRUE)
m |
An object of class DEFM |
par |
A vector of parameters of length |
as_log |
Logical scalar. When |
Numeric, the computed likelihood or log-likelihood of the model.
# Loading Valtente's SNS data
data(valentesnsList)
mymodel <- new_defm(
id = valentesnsList$id,
Y = valentesnsList$Y,
X = valentesnsList$X,
order = 1
)
# Adding the intercept terms and a motif from tobacco to mj
term_defm_logit_intercept(mymodel)
term_defm_transition_formula(mymodel, "{y1, 0y2} > {y1, y2}")
# Computing the log-likelihood
loglike_defm(mymodel, par = c(-1, -1, -1, 2), as_log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.