Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number comment fix #104

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions R/make_occupancy_lpmf.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ make_occupancy_single_lpmf <- function (max_rep) {
array[] int y, // detection data
vector mu, // lin pred for detection
vector occ, // lin pred for occupancy. Elements after vint1[1] irrelevant.
array[] int vint1, // # units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // # sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint1, // n units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // n sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint3, // Indicator for > 0 detections (Q). Elements after vint1[1] irrelevant.

// indices for jth repeated sampling event to each unit (elements after vint1[1] irrelevant):"
Expand Down Expand Up @@ -96,11 +96,11 @@ make_occupancy_augmented_lpmf <- function (max_rep) {
vector mu, // lin pred for detection
vector occ, // lin pred for occupancy. Elements after vint1[1] irrelevant.
vector Omega, // lin pred for availability. Elements after 1 irrelevant.
array[] int vint1, // # units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // # sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint1, // n units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // n sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint3, // Indicator for > 0 detections (Q). Elements after vint1[1] irrelevant.

array[] int vint4, // # species (observed + augmented). Elements after 1 irrelevant.
array[] int vint4, // n species (observed + augmented). Elements after 1 irrelevant.
array[] int vint5, // Indicator for species was observed. Elements after vint4[1] irrelevant

array[] int vint6, // species
Expand Down Expand Up @@ -337,10 +337,10 @@ make_occupancy_multi_colex_lpmf <- function (max_rep, max_year) {
vector occ, // linear predictor for initial occupancy. Elements after vint1[1] irrelevant.
vector colo, // linear predictor for colonization. Elements after vint2[1] irrelevant.
vector ex, // linear predictor for extinction. Elements after vint2[1] irrelevant.
array[] int vint1, // # of series (# of HMMs). Elements after 1 irrelevant.
array[] int vint2, // # units (series-years). Elements after 1 irrelevant.
array[] int vint3, // # years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // # sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint1, // n series (n HMMs). Elements after 1 irrelevant.
array[] int vint2, // n units (series-years). Elements after 1 irrelevant.
array[] int vint3, // n years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // n sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint5, // Indicator for > 0 detections (Q). Elements after vint2[1] irrelevant.

// indices for jth unit (first rep) for each series. Elements after vint1[1] irrelevant."
Expand Down Expand Up @@ -431,10 +431,10 @@ make_occupancy_multi_colex_eq_lpmf <- function (max_rep, max_year) {
vector mu, // linear predictor for detection
vector colo, // linear predictor for colonization. Elements after vint2[1] irrelevant.
vector ex, // linear predictor for extinction. Elements after vint2[1] irrelevant.
array[] int vint1, // # of series (# of HMMs). Elements after 1 irrelevant.
array[] int vint2, // # units (series-years). Elements after 1 irrelevant.
array[] int vint3, // # years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // # sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint1, // n series (n HMMs). Elements after 1 irrelevant.
array[] int vint2, // n units (series-years). Elements after 1 irrelevant.
array[] int vint3, // n years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // n sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint5, // Indicator for > 0 detections (Q). Elements after vint2[1] irrelevant.

// indices for jth unit (first rep) for each series. Elements after vint1[1] irrelevant."
Expand Down Expand Up @@ -528,10 +528,10 @@ make_occupancy_multi_autologistic_lpmf <- function (max_rep, max_year) {
vector occ, // linear predictor for initial occupancy. Elements after vint1[1] irrelevant.
vector colo, // linear predictor for colonization. Elements after vint2[1] irrelevant.
vector autologistic, // logit-scale offset for persistence. Elements after vint2[1] irrelevant.
array[] int vint1, // # of series (# of HMMs). Elements after 1 irrelevant.
array[] int vint2, // # units (series-years). Elements after 1 irrelevant.
array[] int vint3, // # years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // # sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint1, // n series (n HMMs). Elements after 1 irrelevant.
array[] int vint2, // n units (series-years). Elements after 1 irrelevant.
array[] int vint3, // n years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // n sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint5, // Indicator for > 0 detections (Q). Elements after vint2[1] irrelevant.

// indices for jth unit (first rep) for each series. Elements after vint1[1] irrelevant."
Expand Down Expand Up @@ -624,10 +624,10 @@ make_occupancy_multi_autologistic_eq_lpmf <- function (max_rep, max_year) {
vector mu, // linear predictor for detection
vector colo, // linear predictor for colonization. Elements after vint2[1] irrelevant.
vector autologistic, // logit-scale offset for persistence. Elements after vint2[1] irrelevant.
array[] int vint1, // # of series (# of HMMs). Elements after 1 irrelevant.
array[] int vint2, // # units (series-years). Elements after 1 irrelevant.
array[] int vint3, // # years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // # sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint1, // n series (n HMMs). Elements after 1 irrelevant.
array[] int vint2, // n units (series-years). Elements after 1 irrelevant.
array[] int vint3, // n years per series. Elements after vint1[1] irrelevant.
array[] int vint4, // n sampling events per unit (n_rep). Elements after vint2[1] irrelevant.
array[] int vint5, // Indicator for > 0 detections (Q). Elements after vint2[1] irrelevant.

// indices for jth unit (first rep) for each series. Elements after vint1[1] irrelevant."
Expand Down Expand Up @@ -714,8 +714,8 @@ make_occupancy_single_threaded_lpmf <- function (max_rep, grainsize) {
array[] int y, // detection data
vector occ,
vector mu, // lin pred for detection
array[] int vint1, // # units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // # sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint1, // n units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // n sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint3, // Indicator for > 0 detections (Q). Elements after vint1[1] irrelevant.

// indices for jth repeated sampling event to each unit (elements after vint1[1] irrelevant):"
Expand All @@ -734,8 +734,8 @@ make_occupancy_single_threaded_lpmf <- function (max_rep, grainsize) {
sf_text1.2 <- paste0(" ", grainsize, ", // grainsize")
sf_text1.3 <- " y, // detection data
mu, // lin pred for detection
vint1, // # units (n_unit). Elements after 1 irrelevant.
vint2, // # sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
vint1, // n units (n_unit). Elements after 1 irrelevant.
vint2, // n sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
vint3, // Indicator for > 0 detections (Q). Elements after vint1[1] irrelevant.

// indices for jth repeated sampling event to each unit (elements after vint1[1] irrelevant):"
Expand Down Expand Up @@ -770,8 +770,8 @@ make_occupancy_single_partial_sum <- function (max_rep) {
int end,
array[] int y, // detection data
vector mu, // lin pred for detection
array[] int vint1, // # units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // # sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint1, // n units (n_unit). Elements after 1 irrelevant.
array[] int vint2, // n sampling events per unit (n_rep). Elements after vint1[1] irrelevant.
array[] int vint3, // Indicator for > 0 detections (Q). Elements after vint1[1] irrelevant.

// indices for jth repeated sampling event to each unit (elements after vint1[1] irrelevant):"
Expand Down
Loading