% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_space.R
\name{nested_std_dev_from_params}
\alias{nested_std_dev_from_params}
\title{Helper function - wraps single execution of the log-likelihood & deviation
parameters calculations. Used for non nested version of SEM likelihood.}
\usage{
nested_std_dev_from_params(
  params,
  data,
  df,
  timestamp_col,
  entity_col,
  dep_var_col,
  n_entities,
  periods_n
)
}
\arguments{
\item{params}{A matrix (with named rows) with each column corresponding
to a model. Each row specifies model parameters. Compare with
\link[badp]{optim_model_space_params}}

\item{data}{List of the SEM setup matrices, shared along different models}

\item{df}{Data frame with data for the SEM analysis.}

\item{timestamp_col}{The name of the column with timestamps}

\item{entity_col}{Column with entities (e.g. countries)}

\item{dep_var_col}{Column with the dependent variable}

\item{n_entities}{Number of entities - passed to save calc. time}

\item{periods_n}{Number of periods - passed to save calc. time}
}
\value{
#' 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).
}
\description{
Helper function - wraps single execution of the log-likelihood & deviation
parameters calculations. Used for non nested version of SEM likelihood.
}
