Description Usage Arguments Details Value Examples
fit.model
fits the ordered logistic model and sets up some useful
variables for the other perfman
functions.
1 | fit.model(dataset)
|
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. |
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.
An object of class polr
. See documentation for the polr
function in the MASS
package for more details.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.