datapolr: Example Data for a Profile Likelihood in Proportional Odds...

datapolrR Documentation

Example Data for a Profile Likelihood in Proportional Odds Models

Description

This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a proportional odds model.

Usage

data(datapolr)

Format

A data frame with 66 observations on the following 5 variables.

id

a numeric vector; unique identification number

y

a numeric vector; ordinal outcome variable; should be defined as a factor

x1

a numeric vector; covariate

x2

a numeric vector; covariate

group

a numeric vector; covariate and a parameter of interest

Details

This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a proportional odds model. A parameter of interest is group indicator variable, y is an ordinal outcome, and x1 and x2 are covariates in a proportional odds model.

Examples

data(datapolr)
datapolr$y <- as.factor(datapolr$y)
xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", 
				method="logistic", lo.theta=-2, hi.theta=2.5, length=500)
profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)

ProfileLikelihood documentation built on Aug. 25, 2023, 5:15 p.m.