grow.trajectories: Function for looping over all the time periods to calculate...

Description Usage Arguments Examples

View source: R/grow_trajectories_function.r

Description

Function for looping over all the time periods to calculate achievement trajectories called by ZPDGrowthTrajectories()

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
grow.trajectories(
  times,
  assignment,
  students,
  which.curriculum,
  decay.weight,
  school.weight,
  home.weight,
  dosage,
  school.lookup.table,
  home.lookup.table
)

Arguments

times

how many time intervals to compute; the first n values of the assignment vector

assignment

vector indicating which school curriculum will be presented during each time period, where the numbers refer to columns of the curriculum.start.points matrix and zeros represent times of no school instruction (e.g., summmer)

students

a four-column matrix of student characteristics, where the first column contains learn.rate, the second home.env, the third decay.rate, and the fourth achievement. There is one row per student.

which.curriculum

a vector of values indicating which version of the school curriculum should be presented during interval t. The numbers index list elements of the curriculum.start.points and curriculum.widths objects

decay.weight

a global scalar for adjusting the rate of forgetting; prevents having to adjust all decay.rate values

school.weight

a global scalar for adjusting the growth from school exposure; prevents having to adjust all learn.rate values

home.weight

a global scalar for adjusting the growth from home; prevents having to adjust all home.env values

dosage

scalar ranging from 0 to 1 indicating the ratio of school / home exposure during time intervals where school curriculum is presented (e.g., during academic years)

school.lookup.table

the school growth lookup table produced by the build_school_lookup() function

home.lookup.table

the home growth lookup table produced by the build_home_lookup() funtion

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
## Not run: 
curriculum.start.points <- matrix(c(.1, .2, .3), ncol=1)

curriculum.widths <- matrx(rep(.11, 3), ncol=1)

school.lookup.table <- build.school.lookup(integration.points=2000, ZPD.width=.05,
                                           ZPD.offset=.02,
                                           curriculum.start.points=curriculum.start.points,
                                           curriculum.widths=curriculum.widths,
                                           slope1=10, slope2=30, maxachievement=1.5)

home.lookup.table <- build.home.lookup(integration.points=2000, ZPD.width=.05,
                                       ZPD.offset=.02, rate=4, maxachievement=1.5)

students <- matrix(c(.05, .04, .03,
                   .15, .2, .08,
                   .001, .002, .0015,
                   rep(.15, 3)), ncol=4)

grow.trajectories(times=10, students=students, which.curriculum=1,
                  assignment=rep(1, 10), decay.weight=.25, school.weight=1, home.weight=1,
                  dosage=.8, school.lookup.table=list(school.lookup.table),
                  home.lookup.table=home.lookup.table)

## End(Not run)

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