likelihoods_summary | R Documentation |
Approximate standard deviations are computed for the models in the given model space. Two versions are computed.
likelihoods_summary(
df,
dep_var_col,
timestamp_col,
entity_col,
model_space,
exact_value = TRUE,
model_prior = "uniform",
run_parallel = FALSE
)
df |
Data frame with data for the SEM analysis. |
dep_var_col |
Column with the dependent variable |
timestamp_col |
The name of the column with timestamps |
entity_col |
Column with entities (e.g. countries) |
model_space |
A matrix (with named rows) with each column corresponding to a model. Each column specifies model parameters. Compare with optimal_model_space |
exact_value |
Whether the exact value of the likelihood should be
computed ( |
model_prior |
Which model prior to use. For now there are two options:
|
run_parallel |
If |
Matrix with columns describing likelihood and standard deviations for each model. The first row is the likelihood for the model (computed using the parameters in the provided model space). The second row is almost 1/2 * BIC_k as in Raftery's Bayesian Model Selection in Social Research eq. 19 (see TODO in the code below). The third row is model posterior probability. Then there are rows with standard deviations for each parameter. After that we have rows with robust standard deviation (not sure yet what exactly "robust" means).
data_centered_scaled <-
feature_standardization(df = bdsm::economic_growth[,1:7],
timestamp_col = year, entity_col = country)
data_cross_sectional_standarized <-
feature_standardization(df = data_centered_scaled, timestamp_col = year,
entity_col = country, time_effects = TRUE,
scale = FALSE)
likelihoods_summary(df = data_cross_sectional_standarized,
dep_var_col = gdp, timestamp_col = year,
entity_col = country, model_space = economic_growth_ms)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.