Add interactions
Returns function for sigma and rho calculation
Adjusted Akaike's Information Criterion.
add_variable
adds columns to the data matrix
MNlogitf
or MNdogitf
returns log-likelihood(LL) expression for discrete equations of "logit" or "dogit" model.
Trip dataset
LL_joint_no_corr
Function for log-likelihood without correlation between
continuous and discrete equations
LL_joint
Function for joint log-likelihood with correlation between
continuous and discrete equations
Bread for Sandwiches.
Collapses lines ending with " "
Checks if starting values have names
check_par_av
Checks if all elements of par are available in object.
combine_attr_deriv
combines attributes of two deriv()
results.
Example dataset
get_start_disc
get starting values for discrete choice model.
Help function
help function
Log-likelihood expressions for cont. equations
Time-use and expenditure dataset
grad_hess_eval
forms function of gradient and Hessian of log-likelihood produced
by f_create
.
formula2string
removes square brackets from the supplied expressions.
Convert par[2] -> par2, sigma[2] -> sigma_2_, sigma[2,3] -> sigma_2x2
Goodness of fit measures
convert_attr2exp
converts symbolic attribute of derivative into expression object.
Function for finding starting values for nls equations with errors
Significance of correlation matrix
get_npar
Get number of parameters or vector of parameters in supplied equations.
Extracts the number of parameters used in equations. Parameters are given as par[1], ..., par[n].
Goodness of fit measures for both parts
Hessian and Gradient expressions
Log-likelihood expressions for cont. equations plus 1 discrete
in2nmm
convert some estimation results into nmm
object.
get_par
replaces names of parameters with par[i].
Gradient with supplied coefficients
f_create
creates functions for log-likelihood of different models.
Get expression of Hessian and Gradient for discrete choice model with quantile transformation
Log-likelihood expressions for cont. equations sem
get_start_cont
get starting values for continuous equations.
Internal helper function
get_start
get starting values for discrete or continuous choice model.
mlsem
returns expression of log-likelihood for joint normal distribution,
for maximum likelihood (ML), Simultaneous Equations Models (SEM) variant.
Meat for Sandwiches
Maximum likelihood estimation of nonlinear multivariate models (NMM).
Modifies function to optimize sigma and rho
nrParam
return number of parameters used in the estimation.
Converts vector of variances and correlations values into a matrix
Log-likelihood expressions for cont. equations
Another Log-likelihood expressions for cont. equations version 2
Help function
Internal helper function for MNdogitf
searches for 1st good optimization method between possible maxLik algorithms
Hessian with supplied coefficients
help function
searches for 1st good optimization method between possible maxLik algorithms and then applies DEoptim
Replaces expressions ".exprXX" with strings
replace_par
replaces text with other text.
Calculate Heat rate
wxMaxima
does symbolic computation in 'Maxima'
Requires installation of Maxima software.
Generates objects needed for diagnostics functions
cond_expr
returns moments of conditional multivariate normal distribution X|Y (last
variable is dependent). Only expression for X|Y. Requires installation of Maxima software.
extract_attr_deriv
converts attributes(hessian/gradient) of deriv()
into a
matrix of character strings.
maxle
returns expression of log-likelihood (LL) of joint normal distribution.
cond_mean_cov_expr
returns conditional mean and variance X|Y of conditional multivariate
normal distribution . X is discrete variable, Y are continuous variables.
No correlation between discrete eq.
Takes out only data used in continuous estimation
replace_par_wrap
replace text with other text, wrapper of replace_par
.
Log-likelihood(LL) with supplied coefficients.
Converts sigma matrix into parameter vector
Internal helper function for MNlogitf
maxle_p
returns expression of partitioned log-likelihood.
f(y1,y2,..,yn)=f(y1)f(y2|y1)f(y3|y2y1)...f(yn|y1..y(n-1))
prepare_data
prepare data for the estimation.
last time try out DEoptim if no functions before produced "good" results
Helper functions
searches for best optimization method between possible maxLik algorithms
Test if maxLik produces an error
pseudo R^2
Checks if nmm object has an error
string2formula
add square brackets to expressions.
Reverse of formula2string. Convert par[2] <- par2, sigma[2] <- sigma_2_, sigma[2,3] <- sigma_2x2