Skip to content

Commit

Permalink
update function name throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
cbahlai committed Aug 6, 2019
1 parent 93edfcb commit e0b1a1b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion regime_shift_detector.R → dynamic_shift_detector.R
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ modelspecification<-function(specs, data){

#looks like that works! Okay! put it all together like we did for the 2 break model

RSdetector<-function(data, criterion){ #use raw time series data
DSdetector<-function(data, criterion){ #use raw time series data
#plot the data
plot(data)
data1<-addNt1(data)
Expand Down
6 changes: 3 additions & 3 deletions harmonia_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ harmonia.year<-ddply(harmonia, "year", summarize,
avg=sum(ADULTS)/length(ADULTS))

#now, we run it through the RS detector
source("regime_shift_detector.R")
source("dynamic_shift_detector.R")

RSdetector(harmonia.year, "AIC")
DSdetector(harmonia.year, "AIC")

RSdetector(harmonia.year, "AICc")
DSdetector(harmonia.year, "AICc")

harmonia1<-addNt1(harmonia.year)

Expand Down
6 changes: 3 additions & 3 deletions monarch_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ monarch<-read.csv(file="C:/Users/cbahlai/Dropbox/Old_gigs/Zipkin/MonarchOW.csv",


#okay, let's see if it'll work
source("regime_shift_detector.R")
source("dynamic_shift_detector.R")

RSdetector(monarch, criterion="AIC")
DSdetector(monarch, criterion="AIC")

RSdetector(monarch, criterion="AICc")
DSdetector(monarch, criterion="AICc")

monarch1<-addNt1(monarch)

Expand Down
4 changes: 2 additions & 2 deletions simulations.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#script for creating simulated data under a variety of parameters
#and then determining if RSdetector function correctly determines these parameters
#and then determining if DSdetector function correctly determines these parameters

#to-do list

Expand All @@ -9,7 +9,7 @@
#and while we're at it, simulations to test how this all works given different lengths of time series

#get the regime shift detector functions into memory
source("regime_shift_detector.R")
source("dynamic_shift_detector.R")

#create a function that will make fake data based on specified parameters
#assume change, noise is given in percent (0-100) scale, as is change to r, k
Expand Down
2 changes: 1 addition & 1 deletion simulations_weight_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#and then determining if breakweights function correctly determines these parameters

#get the regime shift detector functions into memory
source("regime_shift_detector.R")
source("dynamic_shift_detector.R")

#create a function that will make fake data based on specified parameters
#assume change, noise is given in percent (0-100) scale, as is change to r, k
Expand Down
Binary file modified writing/S2- Function descriptions July 1.docx
Binary file not shown.
Binary file added writing/~$- Function descriptions July 1.docx
Binary file not shown.

0 comments on commit e0b1a1b

Please sign in to comment.