aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Kellner <ken@kenkellner.com>2022-11-21 13:38:19 -0500
committerKen Kellner <ken@kenkellner.com>2022-11-21 13:40:14 -0500
commit208f2db9e1a3023cf706c3a74b014b7db7e1bdc2 (patch)
tree84354db837d9230263ef9fe1f0bdcffefa5cf2bf
parent3ec215ced2a88fb70fbb46a11671a39f29cd81db (diff)
Improve shiny tutorial clarity
-rw-r--r--DESCRIPTION2
-rw-r--r--inst/shinyPower/server.R2
-rw-r--r--inst/shinyPower/ui.R2
-rw-r--r--[-rwxr-xr-x]vignettes/figures/poweranalysis-effectsizes.pngbin11207 -> 13945 bytes
-rw-r--r--vignettes/powerAnalysis.Rmd3
-rw-r--r--vignettes/powerAnalysis.Rmd.orig3
6 files changed, 5 insertions, 7 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index 35c334c..e84e76d 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: unmarked
Version: 1.2.5.9008
-Date: 2022-11-15
+Date: 2022-11-21
Type: Package
Title: Models for Data from Unmarked Animals
Authors@R: c(
diff --git a/inst/shinyPower/server.R b/inst/shinyPower/server.R
index bb49064..75b27c0 100644
--- a/inst/shinyPower/server.R
+++ b/inst/shinyPower/server.R
@@ -37,7 +37,6 @@ get_coefs <- function(input, nulls=FALSE){
parbase <- "coef_"
if(nulls) parbase <- "null_"
pass <- reactiveValuesToList(input)
- pass$shinymanager_where <- NULL
inp_sub <- pass[grepl(parbase,names(pass), fixed=TRUE)]
inp_sub <- pass[!is.na(names(inp_sub))]
names(inp_sub) <- gsub(parbase, "", names(inp_sub))
@@ -64,7 +63,6 @@ get_design_ui <- function(input, default, name){
get_design <- function(input){
pass <- reactiveValuesToList(input)
- pass$shinymanager_where <- NULL
inp_M <- unlist(pass[grepl("design_sites_",names(pass),fixed=TRUE)])
inp_M <- inp_M[1:input[["ndesign_sites"]]]
inp_J <- unlist(pass[grepl("design_obs_",names(pass),fixed=TRUE)])
diff --git a/inst/shinyPower/ui.R b/inst/shinyPower/ui.R
index bf59c3a..636c629 100644
--- a/inst/shinyPower/ui.R
+++ b/inst/shinyPower/ui.R
@@ -1,5 +1,4 @@
library(shiny)
-library(shinymanager)
inline_wrap <- function(f, ...){
out <- f(...)
@@ -50,4 +49,3 @@ ui <- fluidPage(
)
ui
-#secure_app(ui)
diff --git a/vignettes/figures/poweranalysis-effectsizes.png b/vignettes/figures/poweranalysis-effectsizes.png
index e91f662..6435dae 100755..100644
--- a/vignettes/figures/poweranalysis-effectsizes.png
+++ b/vignettes/figures/poweranalysis-effectsizes.png
Binary files differ
diff --git a/vignettes/powerAnalysis.Rmd b/vignettes/powerAnalysis.Rmd
index 9c67344..f2cce35 100644
--- a/vignettes/powerAnalysis.Rmd
+++ b/vignettes/powerAnalysis.Rmd
@@ -891,7 +891,8 @@ It's a good idea to simulate the template model with the largest sample size you
Next you must set the effect sizes you want to test in the power analysis.
Each submodel has its own section.
In this case state = occupancy and det = detection.
-Effect sizes for all parameters in the model default to 0; you'll want to change at least one of them in most cases.
+Effect sizes for all parameters in the model default to 0; you'll want to change them to reflect your expectations about the study system.
+Here we are simulating datasets with an elevation effect of 0.4 (on the logit scale), with occupancy and detection intercepts equal to 0 (equivalent to probabilities of 0.5).
![](figures/poweranalysis-effectsizes.png)
diff --git a/vignettes/powerAnalysis.Rmd.orig b/vignettes/powerAnalysis.Rmd.orig
index d923964..fad2fb0 100644
--- a/vignettes/powerAnalysis.Rmd.orig
+++ b/vignettes/powerAnalysis.Rmd.orig
@@ -581,7 +581,8 @@ It's a good idea to simulate the template model with the largest sample size you
Next you must set the effect sizes you want to test in the power analysis.
Each submodel has its own section.
In this case state = occupancy and det = detection.
-Effect sizes for all parameters in the model default to 0; you'll want to change at least one of them in most cases.
+Effect sizes for all parameters in the model default to 0; you'll want to change them to reflect your expectations about the study system.
+Here we are simulating datasets with an elevation effect of 0.4 (on the logit scale), with occupancy and detection intercepts equal to 0 (equivalent to probabilities of 0.5).
![](figures/poweranalysis-effectsizes.png)