Package 'pomcheckr'

Title: Graphical Check for Proportional Odds Assumption
Description: Implements the method described at the UCLA Statistical Consulting site <https://stats.idre.ucla.edu/r/dae/ordinal-logistic-regression/> for checking if the proportional odds assumption holds for a cumulative logit model.
Authors: Melissa Wong [aut, cre]
Maintainer: Melissa Wong <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2025-02-11 03:41:57 UTC
Source: https://github.com/melissa-wong/pomcheckr

Help Index


National Health and Nutrition Examination Survey 2011-2012

Description

A dataset used in the UCLA Statistical Consulting Survey Analysis in R guide https://stats.idre.ucla.edu/r/seminars/survey-data-analysis-with-r/

Usage

nhanes

Format

A data frame with 9756 rows and 16 variables:

seqn

Respondent sequence number

ridageyr

Age in years at screening

riagendr

Gender

dmdmartl

Marital status

dmdeduc2

Education level - Adults 20+

sdmvpsu

Masked variance pseudo-PSU

sdmvstra

Masked variance pseudo-stratum

wtint2yr

Full sample 2 year interview weight

female

Gender

hsq496

How many days feel anxious

hsq571

SP donated blood in the past 12 months

hsd010

General health condition

pad630

Minutes moderate-intensity work

pad675

Minutes moderate recreational activities

paq665

Moderate recreational activities

pad680

Minutes sedentary activity

Source

https://wwwn.cdc.gov/nchs/nhanes/Search/DataPage.aspx?Component=Demographics&CycleBeginYear=2011


Simulated data for ordinal logistic regression example.

Description

A dataset used in the UCLA Statistical Consulting Ordinal Logistic Regression Example https://stats.idre.ucla.edu/r/dae/ordinal-logistic-regression/

Usage

ologit

Format

A data frame with 400 rows and 4 variables:

apply

Likelihood of applying to graduate school

pared

Indicator for whether at least 1 parent has a graduate degree

public

Indicator for whether undergraduate institution is public or private

gpa

Student's grade point average

Source

https://stats.idre.ucla.edu/stat/data/ologit.dta


Graphical check for proportional odds assumption

Description

Generates the plots described in https://stats.idre.ucla.edu/r/dae/ordinal-logistic-regression/ for checking if the proportional odds assumption holds for a cumulative logit model.

Usage

## S3 method for class 'pomcheck'
plot(x, legend.position = "none", ...)

Arguments

x

a pomcheck object

legend.position

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

...

currently unused

Value

None

See Also

pomcheck

Examples

plot(pomcheck(Species ~ Sepal.Width, iris))

Graphical check for proportional odds assumption

Description

Implements the method described in https://stats.idre.ucla.edu/r/dae/ordinal-logistic-regression/ for checking if the proportional odds assumption holds for a cumulative logit model.

Usage

pomcheck(object, ...)

## Default S3 method:
pomcheck(object, x, data, ...)

## S3 method for class 'formula'
pomcheck(formula, data, ...)

Arguments

object

character string for response

...

currently unused

x

vector of character string(s) for explanatory variable(s)

data

data frame containing the variables

formula

formula of the form y ~ x1 + x2 + ...

Value

an object of class 'pomcheck'

Methods (by class)

  • default: default

  • formula: supports formula specification

See Also

plot.pomcheck

Examples

pomcheck(Species ~ Sepal.Length, iris)
pomcheck(Species ~ Sepal.Length + Sepal.Width, iris)
pomcheck(object="Species", x="Sepal.Length", iris)
pomcheck(object="Species", x=c("Sepal.Length", "Sepal.Width"), iris)