describeTrajectories: Create summary statistics for ZPDGrowthTrajectories

Description Usage Arguments Value See Also Examples

View source: R/describeTrajectories_function.r

Description

describeTrajectories calculates summary statistics by time interval and version of the school curriculum for for ZPDGrowthTrajectories() output.

Usage

1
2
3
4
5
6
describeTrajectories(
  trajectories,
  byTransition = TRUE,
  byVersion = TRUE,
  times = NULL
)

Arguments

trajectories

An object of class ZPD produced by the ZPDGrowthTrajectories() function. If needed, this object will be converted internally to "long" format.

byTransition

Logical. Should descriptives be provided only at curricular transitions (as well as the first and last time point)? Defaults to TRUE.

byVersion

Logical. Should descriptives be broken down by version of the curriculum ( e.g., typical, remedial)? Defaults to TRUE.

times

Optional. A vector of specific times at which descriptives should be computed. Defaults to NULL.

Value

An object of class tibble

See Also

visualizeTrajectories for plotting the trajectories.

ZPDGrowthTrajectories for simulating growth trajectories.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# learning rate
learn.rate <- c(.08, .10, .12, .18)

# decay rate
decay.rate <- c(.04, .03, .02, .01)

# initial achievement
initial.ach <- rep(0, times=4)

# quality of home environment
home.env <- c(.06, .12, .15, .20)

# assignment object simulating starting kindergarten on time 801
#  Kindergarten for 200 days, followed by 100 days of summer
#  then 200 days of first grade
assignment <- c(rep(0, times=800), rep(1, times=200),
                rep(0, times=100), rep(2, times=200))

# define school curriculum
curriculum.start.points <- list(
    # "typical curriculum" start points for K and first grade
  matrix(c(.2, .26), nrow=2, ncol=1),
    # "advanced curriculum" start points for K and first grade
  matrix(c(.22, .29), nrow=2, ncol=1)
)

curriculum.widths <- list(
  # "typical curriculum" widths for K and first grade
  matrix(c(.04, .04), nrow=2, ncol=1),
  # "advanced curriculum" widths for K and first grade
  matrix(c(.05, .05), nrow=2, ncol=1)
)

curriculum.review.slopes <- list(
  # "typical curriculum" review slopes for K and first grade
  matrix(c(30, 30), nrow=2, ncol=1),
  # "advanced curriculum" review slopes for K and first grade
  matrix(c(60, 60), nrow=2, ncol=1)
)

curriculum.advanced.slopes <- list(
  # "typical curriculum" advanced slopes for K and first grade
  matrix(c(50, 50), nrow=2, ncol=1),
  # "advanced curriculum" advanced slopes for K and first grade
  matrix(c(25, 25), nrow=2, ncol=1)
)

# students 1 and 2 get typical curriculum, 3 and 4 get advanced
which.curriculum <- c(1,1,2,2)

 y <- ZPDGrowthTrajectories(learn.rate=learn.rate, home.env=home.env,
                        decay.rate=decay.rate, initial.ach=initial.ach,
                        ZPD.width=.05, ZPD.offset=.02,
                        home.learning.decay.rate=6,
                        curriculum.start.points=curriculum.start.points,
                        curriculum.widths=curriculum.widths,
                        curriculum.review.slopes=curriculum.review.slopes,
                        curriculum.advanced.slopes=curriculum.advanced.slopes,
                        assignment=assignment, dosage=.8,
                        adaptive.curriculum=FALSE,
                        which.curriculum=which.curriculum,
                        school.weight=.5, home.weight=1, decay.weight=.05,
                        verbose=TRUE)
describeTrajectories(y, byVersion=FALSE)

describeTrajectories(y, byTransition=FALSE, times=c(100, 300, 650))

mcbeem/ZPDGrowthTrajectories documentation built on May 18, 2020, 2:04 p.m.