Click or drag to resize

LogisticRegressionParameterCalcLogLikelihood Method

Computes the value of the log likelihood function for a binomial logistic regression model with the given predictor variable values, probabilities and observed dichotomous outcomes.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double LogLikelihood(
	DoubleMatrix X,
	DoubleVector p,
	DoubleVector y
)

Parameters

X  DoubleMatrix
Matrix of predictor variables. Each row represents a subject.
p  DoubleVector
Probability of success for each subject. ith element corresponds to the ith row of the matrix X.
y  DoubleVector
Observed vector of dichotomous outcomes. The values in y must be 1.0 for a postive outcome and 0.0 for a negative outcome.

Return Value

Double
The value of the log likelihood function.
See Also