Description Usage Format Source Examples
Longitudinal data from an experiment to promote the recovery of stroke patients in wide format. The response variable is the Bartel index with higher scores meaning better outcomes and a maximum score of 100.
1 |
A tibble
with 24 observations and the following 10 variables.
Subject
subject number
Group
group; A=new occupational therapy intervention, B = existing stroke rehabilitation program in the same hospital as A, C = usual care in a different hospital
week1
Bartel index in week 1
week2
Bartel index in week 2
week3
Bartel index in week 3
week4
Bartel index in week 4
week5
Bartel index in week 5
week6
Bartel index in week 6
week7
Bartel index in week 7
week8
Bartel index in week 8
C. Cropper, University of Queensland
1 2 3 4 5 6 7 8 9 10 11 | data(stroke.wide)
summary(stroke.wide)
# To transform data from wide to long format use
## Not run:
library(reshape2)
stroke = melt(data=stroke.wide, id.vars=c('Subject','Group'),
value.name='ability', variable.name='week')
stroke$time = as.numeric(gsub('week', '', stroke$week))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.