fit.model: Fitting the model

Description Usage Arguments Details Value Examples

Description

fit.model fits the ordered logistic model and sets up some useful variables for the other perfman functions.

Usage

1
fit.model(dataset)

Arguments

dataset

A data frame whose first column is an ordered numeric factor containing the positive integers and whose subsequent columns are the explanatory variables for modelling. For analysis in this package all the explanatory variables must be factors.

Details

The function fits the model using MASS::polr. This is saved to fit.

Then the vector cuts is created which are the cuts from the model (these divide the cumulative density into the areas set for the ordered outcomes), including -Inf for the zeroth cut and Inf for the end point. This makes it convenient for another perfman function to use.

Next two sets of tables are created which create the marginal distributions from the dataset that is being analysed. counts.raw gives you the actual counts, while proportions.raw gives you the proportions.

Finally a vector of variables is created, again for the convenience of other functions in perfman. This vector simply contains the names of the explanatory variables from the model.

Value

An object of class polr. See documentation for the polr function in the MASS package for more details.

Examples

1

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