aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Kellner <ken@kenkellner.com>2022-11-10 14:52:43 -0500
committerKen Kellner <ken@kenkellner.com>2022-11-10 14:52:43 -0500
commitb8f489b6e8e3995386ab4b020ad8d0e4a24fb04a (patch)
tree6a64eb1d06400cbe77027df37ea90e64e2a673d6
parent33ea444a2d8aec16e823cdfd77522bbc6daa2219 (diff)
Clean up check
-rw-r--r--R/power.R2
-rw-r--r--man/shinyPower.Rd16
-rw-r--r--man/unmarkedPowerList.Rd6
3 files changed, 22 insertions, 2 deletions
diff --git a/R/power.R b/R/power.R
index b998a1f..da2072c 100644
--- a/R/power.R
+++ b/R/power.R
@@ -426,7 +426,7 @@ shinyPower <- function(object, ...){
if(!inherits(object, "unmarkedFit")){
stop("Requires unmarkedFit object", call.=FALSE)
}
- if(!require(shiny)){
+ if(!requireNamespace("shiny")){
stop("Install the shiny library to use this function", call.=FALSE)
}
options(unmarked_shiny=TRUE)
diff --git a/man/shinyPower.Rd b/man/shinyPower.Rd
new file mode 100644
index 0000000..ef338aa
--- /dev/null
+++ b/man/shinyPower.Rd
@@ -0,0 +1,16 @@
+\name{shinyPower}
+\alias{shinyPower}
+\title{Launch a Shiny app to help with power analysis}
+\description{
+ Launch a Shiny app to test power under various scenarios. Requires the Shiny
+ package to be installed.
+}
+\usage{
+shinyPower(object, ...)
+}
+\arguments{
+ \item{object}{A template \code{unmarkedFit} object; see
+ documentation for \code{powerAnalysis} for details on how to create this}
+ \item{...}{Currently ignored}
+}
+\value{No return value, called for its side effects.}
diff --git a/man/unmarkedPowerList.Rd b/man/unmarkedPowerList.Rd
index 335d82b..3dbbcf1 100644
--- a/man/unmarkedPowerList.Rd
+++ b/man/unmarkedPowerList.Rd
@@ -23,7 +23,7 @@
\usage{
\S4method{unmarkedPowerList}{list}(object, ...)
\S4method{unmarkedPowerList}{unmarkedFit}(object, coefs, design, alpha=0.05,
- nsim=100, parallel=FALSE, ...)
+ nulls=list(), nsim=100, parallel=FALSE, ...)
\S4method{show}{unmarkedPowerList}(object)
\S4method{summary}{unmarkedPowerList}(object, ...)
\S4method{plot}{unmarkedPowerList,ANY}(x, power=NULL, param=NULL, ...)
@@ -41,6 +41,10 @@
number of observations. If you have >1 primary period a \code{T} column
must also be provided}
\item{alpha}{Type I error rate}
+ \item{nulls}{If provided, a list matching the structure of \code{coefs} which
+ defines the null hypothesis value for each parameter. By default the null
+ is 0 for all parameters.
+ }
\item{nsim}{The number of simulations to run for each scenario/study design}
\item{parallel}{If \code{TRUE}, run simulations in parallel}
\item{power}{When plotting, the target power. Draws a horizontal line