From aed160d7f0eaf5865e2bd9bf6c4b1c9d7b13d911 Mon Sep 17 00:00:00 2001 From: Ranke Johannes Date: Wed, 31 Jan 2024 13:16:17 +0100 Subject: Reorganise data generation - Use inst/data_generation for R code generating data as in some of my other packages - data/*.RData files were checked using https://github.com/jranke/dotfiles/blob/main/bin/rda_diff contents were not changed - Remove ChangeLog, the history is in the git logs - Update docs and some links contained therein - use \doi{} markup - Move logs to log directory --- docs/reference/sawtooth.html | 218 ++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 140 deletions(-) (limited to 'docs/reference/sawtooth.html') diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html index fea24d4..8e29b9c 100644 --- a/docs/reference/sawtooth.html +++ b/docs/reference/sawtooth.html @@ -1,68 +1,13 @@ - - - - - - - -Create decline time series for multiple applications — sawtooth • pfm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Create decline time series for multiple applications — sawtooth • pfm - - - - + + -
-
- -
- -
+
-
sawtooth(
-  x,
-  n = 1,
-  i = 365,
-  applications = data.frame(time = seq(0, (n - 1) * i, length.out = n), amount = 1)
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - -
x

A one_box object

n

The number of applications. If applications is specified, n is ignored

i

The interval between applications. If applications is specified, i -is ignored

applications

A data frame holding the application times in the first column and -the corresponding amounts applied in the second column.

- - -

Examples

-
applications = data.frame(time = seq(0, 14, by = 7), amount = c(1, 2, 3)) -pred <- one_box(10) -plot(sawtooth(pred, applications = applications))
-m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165
pred_2 <- one_box(fit_2, ini = 1) -pred_2_saw <- sawtooth(pred_2, 2, 7) -plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")
-max_twa(pred_2_saw)
#> $max -#> parent m1 -#> 0.7834480 0.8617048 -#> -#> $window_start -#> parent m1 -#> 0.00 26.85 -#> -#> $window_end -#> parent m1 -#> 21.00 47.85 -#>
+
+
sawtooth(
+  x,
+  n = 1,
+  i = 365,
+  applications = data.frame(time = seq(0, (n - 1) * i, length.out = n), amount = 1)
+)
+
+ +
+

Arguments

+
x
+

A one_box object

+ + +
n
+

The number of applications. If applications is specified, n is ignored

+ + +
i
+

The interval between applications. If applications is specified, i +is ignored

+ + +
applications
+

A data frame holding the application times in the first column and +the corresponding amounts applied in the second column.

+ +
+ +
+

Examples

+
applications = data.frame(time = seq(0, 14, by = 7), amount = c(1, 2, 3))
+pred <- one_box(10)
+plot(sawtooth(pred, applications = applications))
+
+
+m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
+#> Temporary DLL for differentials generated and loaded
+fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE)
+#> Warning: Observations with value of zero were removed from the data
+pred_2 <- one_box(fit_2, ini = 1)
+pred_2_saw <- sawtooth(pred_2, 2, 7)
+plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")
+
+
+max_twa(pred_2_saw)
+#> $max
+#>    parent        m1 
+#> 0.7834481 0.8617049 
+#> 
+#> $window_start
+#> parent     m1 
+#>   0.00  26.85 
+#> 
+#> $window_end
+#> parent     m1 
+#>  21.00  47.85 
+#> 
+
+
+
-
- - + + -- cgit v1.2.1