derivatives: Calculate derivatives of loglikelihood

Description Usage Arguments Value Author(s) See Also

Description

Functions used to calculate the first and second derivatives of the log-likelihood with respect to the estimated parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
scoreMean(eta_1,eta_0,std.dev,prob,link)

scoreVar(eta_1,eta_0,std.dev,gstd.dev,prob,link)

scoreThresh(estThresh,outcomematrix,eta_1,eta_0,std.dev,prob,link)

hessMean_Mean(eta_1,eta_0,std.dev,prob,link)

hessMean_Var(eta_1,eta_0,std.dev,gstd.dev,prob,link)

hessVar_Var(eta_1,eta_0,std.dev,gstd.dev,hstd.dev,prob,link)

hessMean_Thresh(estThresh,outcomematrix,eta_1,eta_0,std.dev,prob,link)

hessVar_Thresh(estThresh,outcomematrix,eta_1,eta_0,std.dev,gstd.dev,prob,link)

hessThresh_Thresh(estThresh,outcomematrix,eta_1,eta_0,std.dev,prob,link)

Arguments

eta_1

numeric vector or matrix. Refers to the input to the link function to calculate the probability at the right threshold of the outcome.

eta_0

numeric vector or matrix. Refers to the input to the link function to calculate the probability at the left threshold of the outcome.

std.dev

numeric vector or matrix. The standard deviation of the error term for the observations given the data and parameters.

prob

numeric vector or matrix. Probability of the outcome given the parameters and data.

link

character, indicates link function for the estimated model.

estThresh

numeric vector indicating which of the threshold values are estimated.

outcomematrix

numeric matrix indicating the outcome for each observation.

gstd.dev

numeric vector or matrix. The first derivative of standard deviation of the error term for the observations given the data and parameters.

hstd.dev

numeric vector or matrix. The second derivative of standard deviation of the error term for the observations given the data and parameters.

Value

numeric vector or matrix, depending on the structure of the inputs. Derivatives of the log-likelihood with respect to constants in the mean and variance equations and the threshold values.

Author(s)

Nathan Carroll, nathan.carroll@ur.de

See Also

oglmx


oglmx documentation built on May 2, 2019, 5:14 a.m.