Learn R Programming

emmeans (version 1.6.2-1)

neuralgia: Neuralgia data

Description

These data arise from a study of analgesic effects of treatments of elderly patients who have neuralgia. Two treatments and a placebo are compared. The response variable is whether the patient reported pain or not. Researchers recorded the age and gender of 60 patients along with the duration of complaint before the treatment began.

Usage

neuralgia

Arguments

Format

A data frame with 60 observations and 5 variables:

Treatment

Factor with 3 levels A, B, and P. The latter is placebo

Sex

Factor with two levels F and M

Age

Numeric covariate -- patient's age in years

Duration

Numeric covariate -- duration of the condition before beginning treatment

Pain

Binary response factor with levels No and Yes

Examples

Run this code
# NOT RUN {
# Model and analysis shown in the SAS report:
neuralgia.glm <- glm(Pain ~ Treatment * Sex + Age, family = binomial(),
   data = neuralgia) 
pairs(emmeans(neuralgia.glm, ~ Treatment, at = list(Sex = "F")), 
    reverse = TRUE, type = "response", adjust = "bonferroni")

# }

Run the code above in your browser using DataLab