P.X: Probability function for perfman.

Description Usage Arguments Details Value Examples

Description

This utility function calcuates the probability of a specific outcome for a full set of values for the explanatory variables in the fitted model.

Usage

1
P.X(X, outcome, variable, value)

Arguments

X

A real number. This is the number that is picking out one member of the family of probability functions that are consistent with the fitted logisitic model.

outcome

An integer specifying a particular outcome. This is one of the values of the outcome variable (i.e. the dependent variable from the model)

variable

A column name from the original data frame. This will be the variable one of whose values you are calculating the probability for.

value

A specific value of the variable under consideration. This value must be one of the values actually used in the data frame for fit.model. This is the specific category you are calculating the probability for (for your chosen outcome).

Details

This function is best thought of as a real-valued function of a single variable X, with the function being specified by variable, value and outcome. For a particular value of an explanatory variable, each value of X will return a probability, and the same value of X will, for a different value of the same variable, return a probability that is consistent with the set of estimated coefficients from the logistic model that has been fitted. (The value of the outcome variable is also taken account of too.)

Value

The calculated probability corresponding to the values you have specified.

Examples

1
P.X(-1.9,2,"gender","female")

sumitrahman/perfman documentation built on May 30, 2019, 8:37 p.m.