% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_space.R
\name{non_nested_optimization_wrapper}
\alias{non_nested_optimization_wrapper}
\title{Helper-function - finds parameters minimizing log-likelihood function
for the non-nested version of the SEM setup, using BFGS method}
\usage{
non_nested_optimization_wrapper(
  params,
  df,
  timestamp_col,
  entity_col,
  dep_var_col,
  exact_value,
  n_all_regressors,
  n_timestamp,
  control
)
}
\arguments{
\item{params}{Vector of the initial parameters}

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

\item{timestamp_col}{Column which determines time periods. For now only
natural numbers can be used as timestamps}

\item{entity_col}{Column which determines entities (e.g. countries, people)}

\item{dep_var_col}{Column with dependent variable}

\item{exact_value}{Whether the exact value of the likelihood should be
computed (\code{TRUE}) or just the proportional part (\code{FALSE}). Check
\link[badp]{sem_likelihood} for details.}

\item{n_all_regressors}{Integer. Total number of potential regressors in the
full (maximal) model space. Used to compute the full parameter dimension
(for \eqn{\phi} and \eqn{\psi}) so that parameters corresponding to excluded
regressors can be padded with \code{NA} in the non-nested setup.}

\item{n_timestamp}{Integer. Number of time periods in the panel (i.e. the
number of distinct values in \code{timestamp_col}). Used to determine the
required number of \eqn{\phi} and \eqn{\psi} parameters for the current model
and for the full model.}

\item{control}{a list of control parameters for the optimization which are
passed to \link[stats]{optim}. Default is
\code{list(trace = 2, maxit = 10000, fnscale = -1, REPORT = 100, scale = 0.05)}.}
}
\value{
List (or matrix) of parameters describing analyzed models.
}
\description{
Helper-function - finds parameters minimizing log-likelihood function
for the non-nested version of the SEM setup, using BFGS method
}
