Skip to content

Commit

Permalink
abund projections
Browse files Browse the repository at this point in the history
  • Loading branch information
garciacallejas committed Jun 1, 2020
1 parent d031042 commit 0940840
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RK_project_alpha_pairwise_lambdacov_global_alphacov_global <- function(lambda,

term <- 0 #create the denominator term for the model
for(z in 1:length(abundance)){
term <- term - (alpha[z] + cov_term[[z]]) * abundance[z]
term <- term - (alpha[z] + cov_term) * abundance[z]
}
expected_abund <- (lambda * (num) * exp(term)) * abundance[names(lambda)]
expected_abund
Expand Down
2 changes: 1 addition & 1 deletion R/abundance_projection.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @param alpha_matrix square matrix with taxa names in rows and columns.
#' @param lambda_cov optional named matrix with covariates in columns and taxa in rows,
#' representing the effect of each covariate on the lambda parameter of each taxa.
#' @param alpha_cov optional list. Each element of the named list represents the effects of
#' @param alpha_cov REWRITE optional list. Each element of the named list represents the effects of
#' a covariate over alpha values. Thus, each list element contains either
#' a single element (alpha_cov_form "global").
#' or a square matrix of same dimensions as `alpha_matrix` (alpha_cov_form "pairwise").
Expand Down

0 comments on commit 0940840

Please sign in to comment.