rvary2: rvary2 from Stata - simple tables for categorival variables

rvary2R Documentation

rvary2 from Stata - simple tables for categorival variables

Description

5 different raters could rate 10 subjects with levels 1, 2, 3

Usage

rvary2

Format

A tibble with 10 observations (1, 2, 3) on 5 variables representing different raters and one variable for subject ID.

subject

Subject ID

rater1

a factor including the diagnoses of rater 1 (levels see above)

rater2

a factor including the diagnoses of rater 2 (levels see above)

rater3

a factor including the diagnoses of rater 3 (levels see above)

rater4

a factor including the diagnoses of rater 4 (levels see above)

rater5

a factor including the diagnoses of rater 5 (levels see above)

Source

Datasets for Stata Base Reference Manual, Release 13

References

Datasets for Stata Base Reference Manual, Release 13

Examples

rvary2

library(dplyr)
library(tidyr)
rvary2 %>%
  tidyr::gather(.,
                key = "rater",
                value = "rating",
                dplyr::starts_with("rater")) %>%
  with(., table(subject, rating))

emilelatour/lagree documentation built on Sept. 18, 2024, 5:19 p.m.