-
Notifications
You must be signed in to change notification settings - Fork 0
/
US_Virgin_Islands_SGP.R
56 lines (30 loc) · 1.18 KB
/
US_Virgin_Islands_SGP.R
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
#####################################################
###
### SCRIPT FOR CREATING SGPs FOR US VIRGIN ISLANDS
###
#####################################################
### LOAD SGP PACKAGE
require(SGP)
### Load LONG Data
load("Data/US_Virgin_Islands_Data_LONG.Rdata")
### prepareSGP
US_Virgin_Islands_SGP <- prepareSGP(US_Virgin_Islands_Data_LONG, create.additional.variables=FALSE)
### analyzeSGP
US_Virgin_Islands_SGP <- analyzeSGP(US_Virgin_Islands_SGP,
sgp.percentiles=TRUE,
sgp.projections=TRUE,
sgp.projections.lagged=TRUE,
sgp.percentiles.baseline=FALSE,
sgp.projections.baseline=FALSE,
sgp.projections.lagged.baseline=FALSE)
### combineSGP
US_Virgin_Islands_SGP<-combineSGP(US_Virgin_Islands_SGP)
### summarizeSGP
US_Virgin_Islands_SGP <- summarizeSGP(US_Virgin_Islands_SGP)
### outputSGP
outputSGP(US_Virgin_Islands_SGP)
### save results
save(US_Virgin_Islands_SGP, file="Data/US_Virgin_Islands_SGP.Rdata")
### visualizeSGP (Occurs last due to subsetting of data)
US_Virgin_Islands_SGP@Data <- US_Virgin_Islands_SGP@Data[ORIGIN=="VI"]
visualizeSGP(US_Virgin_Islands_SGP, plot.types=c("growthAchievementPlot", "studentGrowthPlot"), sgPlot.demo.report=TRUE)