Skip to content

Commit

Permalink
Update main function examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulthran committed Oct 12, 2023
1 parent dc0807c commit c546cc2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
^\.github$
^codecov\.yml$
^.lintr
^cran-comments\.md$
2 changes: 0 additions & 2 deletions R/simulate_zero_inflated_beta_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#' @importFrom stats rnorm rbinom rbeta
#' @export
#' @examples
#' \dontrun{
#' simulate_zero_inflated_beta_random_effect_data(
#' subject_n = 100, time_n = 5,
#' X = as.matrix(c(rep(0, 50 * 5), rep(1, 50 * 5))),
Expand All @@ -36,7 +35,6 @@
#' v = 5,
#' sim_seed = 100
#' )
#' }
simulate_zero_inflated_beta_random_effect_data <- function(subject_n = 50, time_n = 5, v = 2,
alpha = as.matrix(c(0, 0.5, -1)),
beta = as.matrix(c(-0.5, -0.5, 0.5)),
Expand Down
4 changes: 2 additions & 2 deletions R/zibr.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#'
#' @export
#' @examples
#' \dontrun{
#' ## simulate some data
#' sim <- simulate_zero_inflated_beta_random_effect_data(
#' subject_n = 100, time_n = 5,
Expand All @@ -34,13 +33,14 @@
#' v = 5,
#' sim_seed = 100
#' )
#'
#' ## run zibr on the simulated data
#' zibr_fit <- zibr(
#' logistic_cov = sim$X, beta_cov = sim$Z, Y = sim$Y,
#' subject_ind = sim$subject_ind, time_ind = sim$time_ind
#' )
#'
#' zibr_fit
#' }
zibr <- function(logistic_cov,
beta_cov,
Y,
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ Accordingly, we can test three biologically relevant null hypotheses:
- H0: α_j = 0 and β_j = 0 for each covariate X_j and Z_j. This is to joinly test the coefficients in both logistic and Beta components, if the covariates affect the taxon both in terms of presence/absence and its non-zero abundance.

## Installation
You can install our ZIBR package from Github
You can install our ZIBR package from CRAN

```r
install.packages("ZIBR")
```

Or get the dev version from GitHub

```r
#install.packages("devtools")
devtools::install_github("PennChopMicrobiomeProgram/ZIBR")
Expand Down
2 changes: 0 additions & 2 deletions man/simulate_zero_inflated_beta_random_effect_data.Rd

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

4 changes: 2 additions & 2 deletions man/zibr.Rd

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

0 comments on commit c546cc2

Please sign in to comment.