diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index ba8118b..5739bc6 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 1.2.0 -Date: 2023-09-11 22:08:20 UTC -SHA: ba10aa7dd9c9ea57675350652ba4e2bf4df1b7cf +Version: 1.3.1 +Date: 2024-01-24 17:50:23 UTC +SHA: 762aac6f412d4cd1d25d68b5d75be87a00614097 diff --git a/DESCRIPTION b/DESCRIPTION index 9bba153..a4ab7f1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,7 +44,6 @@ BugReports: https://github.com/noaa-nwfsc/zoid/issues Depends: R (>= 3.4.0) Imports: - compositions, gtools, methods, Rcpp (>= 0.12.0), diff --git a/NEWS.md b/NEWS.md index c9e7a6a..7268fd1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# zoid 1.3.1 + +* Remove dependency on compositions package, change URLs to noaa-nwfsc + +# zoid 1.3.0 + +* Updated models to allow for random effects + # zoid 1.2.0 * Updated Stan code to reflect changes needed to be compatible with Stan 2.26 (arrays) diff --git a/R/fitting.R b/R/fitting.R index 2d875fd..0f787af 100644 --- a/R/fitting.R +++ b/R/fitting.R @@ -30,18 +30,18 @@ #' nrow = 3, byrow = TRUE #' ) #' # fit a model with no covariates -#' fit <- fit_zoid(data_matrix = y) +#' fit <- fit_zoid(data_matrix = y, chains = 1, iter = 100) #' #' # fit a model with 1 factor #' design <- data.frame("fac" = c("spring", "spring", "fall")) -#' fit <- fit_zoid(formula = ~fac, design_matrix = design, data_matrix = y) +#' fit <- fit_zoid(formula = ~fac, design_matrix = design, data_matrix = y, chains = 1, iter = 100) #' } #' # try a model with random effects #' set.seed(123) #' y <- matrix(runif(99,1,4), ncol=3) #' design <- data.frame("fac" = sample(letters[1:5], size=nrow(y), replace=TRUE)) #' design$fac <- as.factor(design$fac) -#' fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y) +#' fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y, chains = 1, iter = 100) #' fit_zoid <- function(formula = NULL, design_matrix, diff --git a/inst/CITATION b/inst/CITATION index 2276d8b..2cd721c 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -14,5 +14,5 @@ bibentry(bibtype = "Manual", ), year = year, note = note, - url = "https://nwfsc-cb.github.io/zoid/") + url = "https://noaa-nwfsc.github.io/zoid/") diff --git a/man/fit_dirichlet.Rd b/man/fit_dirichlet.Rd new file mode 100644 index 0000000..ea2bba7 --- /dev/null +++ b/man/fit_dirichlet.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fit_prior.R +\name{fit_dirichlet} +\alias{fit_dirichlet} +\title{Extract point estimates of compositions from fitted model.} +\usage{ +fit_dirichlet(data) +} +\arguments{ +\item{data}{The data to fit the dirichlet distribution to} +} +\description{ +Extract point estimates of compositions from fitted model. +} diff --git a/man/fit_zoid.Rd b/man/fit_zoid.Rd index 12ba33e..c7ce016 100644 --- a/man/fit_zoid.Rd +++ b/man/fit_zoid.Rd @@ -57,17 +57,17 @@ y <- matrix(c(3.77, 6.63, 2.60, 0.9, 1.44, 0.66, 2.10, 3.57, 1.33), nrow = 3, byrow = TRUE ) # fit a model with no covariates -fit <- fit_zoid(data_matrix = y) +fit <- fit_zoid(data_matrix = y, chains = 1, iter = 100) # fit a model with 1 factor design <- data.frame("fac" = c("spring", "spring", "fall")) -fit <- fit_zoid(formula = ~fac, design_matrix = design, data_matrix = y) +fit <- fit_zoid(formula = ~fac, design_matrix = design, data_matrix = y, chains = 1, iter = 100) } # try a model with random effects set.seed(123) y <- matrix(runif(99,1,4), ncol=3) design <- data.frame("fac" = sample(letters[1:5], size=nrow(y), replace=TRUE)) design$fac <- as.factor(design$fac) -fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y) +fit <- fit_zoid(formula = ~(1|fac), design_matrix = design, data_matrix = y, chains = 1, iter = 100) }