-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update DESCRIPTION * Update DESCRIPTION * Update R-CMD-check.yml * Update R-CMD-check.yml * try removing ThorsonUtilities * Update R-CMD-check.yml * try to make Actions happy * try at getting INLA dependency to work in Actions * Update test-zeroinfl-against-pscl.R * another attempt at making R_CMD_check happy * another attempt * another attempt * another attempt * another attempt * another attempt * remove Linux from github Actions * update NEWS * Update test-multi-species-examples.R --------- Co-authored-by: Jim Thorson <James.T.Thorson@gmail.com>
- Loading branch information
1 parent
395970d
commit 431621f
Showing
18 changed files
with
97 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
|
||
#' List fixed and random effects | ||
#' | ||
#' \code{list_parameters} lists all fixed and random effects | ||
#' | ||
#' @param Obj Compiled TMB object | ||
#' @return Return Tagged-list of fixed and random effects (returned invisibly) | ||
|
||
#' @export | ||
list_parameters = function( Obj, verbose=TRUE ){ | ||
Return = list() | ||
Table = data.frame() | ||
if( length(Obj$env$random)>0 ){ | ||
Return[["Fixed_effects"]] = names(Obj$env$last.par[-Obj$env$random]) | ||
Return[["Random_effects"]] = names(Obj$env$last.par[Obj$env$random]) | ||
Table = data.frame( "Coefficient_name"=names(table(Return[["Fixed_effects"]])), | ||
"Number_of_coefficients"=as.numeric(table(Return[["Fixed_effects"]])), | ||
"Type"="Fixed") | ||
Table = rbind( Table, | ||
data.frame("Coefficient_name"=names(table(Return[["Random_effects"]])), | ||
"Number_of_coefficients"=as.numeric(table(Return[["Random_effects"]])), | ||
"Type"="Random")) | ||
}else{ | ||
Return[["Fixed_effects"]] = names(Obj$env$last.par) | ||
Table = data.frame( "Coefficient_name"=names(table(Return[["Fixed_effects"]])), | ||
"Number_of_coefficients"=as.numeric(table(Return[["Fixed_effects"]])), | ||
"Type"="Fixed") | ||
} | ||
if( verbose==TRUE ){ | ||
message("List of estimated fixed and random effects:") | ||
print(Table) | ||
} | ||
return( invisible(Table) ) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.