Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
PMildenb committed Sep 12, 2023
2 parents b7e0512 + 7d7e200 commit e3130b8
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ inst/doc
.Ruserdata
sync.ffs_db
.RDataTmp
.idea
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: SteppedPower
Type: Package
Title: Power Calculation for Stepped Wedge Designs
Version: 0.3.3
Version: 0.3.3.1
Authors@R: c(
person("Philipp", "Mildenberger", role = c("aut", "cre"), email = "pmildenb@uni-mainz.de", comment = c(ORCID = "0000-0002-7367-1708")),
person("Federico", "Marini", role = "ctb", email = "marinif@uni-mainz.de", comment = c(ORCID = "0000-0003-3252-7758")))
Expand All @@ -27,5 +27,5 @@ Suggests:
pwr
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions R/SteppedPower-pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
#'
#' @author Philipp Mildenberger \email{pmildenb@@uni-mainz.de}
#' @name SteppedPower-pkg
#' @aliases SteppedPower-package
#' @docType package
NULL
5 changes: 2 additions & 3 deletions R/construct_CovMat.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ construct_CovBlk <- function(sigma,

if(!is.null(tau)){
tauMat <- if(is.null(AR[[1]])) tau %o% tau
else tau %o% tau * toeplitz(AR[[1]] ** (0:(timepoints-1)))
else tau %o% tau * toeplitz(AR[[1]] ^ (0:(timepoints-1)))
out <- out + tauMat
}
if(!is.null(eta)) {
etaMat <- if(is.null(AR[[2]])) eta %o% eta
else eta %o% eta * toeplitz(AR[[2]] ** (0:(timepoints-1)))
else eta %o% eta * toeplitz(AR[[2]] ^ (0:(timepoints-1)))
out <- out + etaMat
}
if(!is.null(rho)) {
Expand Down Expand Up @@ -85,7 +85,6 @@ construct_CovSubMat <- function(N,
AR = NULL,
rho = NULL,
gamma = NULL,
trtMat = NULL,
psi = NULL,
INDIV_LVL = FALSE){

Expand Down
2 changes: 1 addition & 1 deletion R/construct_DesMat.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ construct_timeAdjust <- function(Cl,
return(timeBlks)
}

#' @title Constructs a matrix of 0 and 1 for unobserved and observed cluster periods, respectively.
#' @title Constructs a matrix of `NA` and `1` for unobserved and observed cluster periods, respectively.
#'
#' @description Mostly useful to build incomplete stepped wedge designs
#'
Expand Down
15 changes: 15 additions & 0 deletions R/wlsPower.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
INDIV_LVL = FALSE,
INFO_CONTENT = NULL,
verbose = 1){

## Match string inputs ####
### dsntype
dsntypeOptions <- c("SWD","parallel","parallel_baseline","crossover")
Expand All @@ -260,6 +261,20 @@
message("Assumes ", tmpfamily, "distribution")
family <- tmpfamily
}
### time Adjustment
AdjOptions <- c("factor", "none", "linear", "periodic", "quadratic")
tmptimeAdjust <- choose_character_Input(AdjOptions,timeAdjust)
if(tmptimeAdjust != timeAdjust){
message("Assumes", tmptimeAdjust, "as time adjustment")
timeAdjust <- tmptimeAdjust
}
### df Adjustment
dfOptions <- c("none","between-within", "containment", "residual")
tmpdfAdjust <- choose_character_Input(dfOptions, dfAdjust)
if(tmpdfAdjust != dfAdjust){
message("Assumes", tmpdfAdjust, "as df adjustment")
dfAdjust <- tmpdfAdjust
}

## CHECKS #####
if(!is.null(N) & !is.null(power))
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Submission of version 0.3.3.1

* Fixed the roxygen2 bug as explained in https://github.com/r-lib/roxygen2/issues/1491


## Submission of version 0.3.2

### Changes to version 0.3.1
Expand Down
1 change: 1 addition & 0 deletions man/SteppedPower-pkg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions man/construct_CovSubMat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/construct_incompMat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e3130b8

Please sign in to comment.