Skip to content

Commit

Permalink
Updates to test that
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMostert committed Mar 22, 2024
1 parent 3a95386 commit 85d3eb0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/testthat/testthat_dataOrganize.R
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,22 @@ test_that('makeComponents is able to make the correct components for all the pro
"pointcov",
"factvar(main = factvar, model = \"iid\",constr = FALSE, fixed=TRUE)",
"factvar_phi(main = factvar_phi, model = \"iid\", initial = -10, fixed = TRUE)"))
#Check replicate
compsrep <- Check$makeComponents(spatial = NULL, intercepts = FALSE, datanames = c('PO','PA'), speciesintercept = NULL, speciesenvironment = TRUE,
marks = c('numvar', 'factvar', 'binommark'), marksspatial = FALSE, offsetname = NULL,
multinomnames = 'factvar', pointcovariates = 'pointcov', marksintercept = FALSE, speciesindependent = FALSE,
speciesname = 'species', covariatenames = 'spatcovs', speciesspatial = 'replicate',
covariateclass = 'numeric', numtime = 2, copymodel = Check$.__enclos_env__$private$copyModel,
biasformula = NULL, covariateformula = NULL)

expect_setequal(compsrep,c("speciesShared(main = geometry, model = speciesField, group = speciesSpatialGroup, control.group = list(model = \"iid\"))",
"fish2_spatcovs(main = fish2_spatcovs, model = \"numeric\")",
"fish1_spatcovs(main = fish1_spatcovs, model = \"numeric\")",
"bird2_spatcovs(main = bird2_spatcovs, model = \"numeric\")",
"bird1_spatcovs(main = bird1_spatcovs, model = \"numeric\")",
"pointcov",
"factvar(main = factvar, model = \"iid\",constr = FALSE, fixed=TRUE)",
"factvar_phi(main = factvar_phi, model = \"iid\", initial = -10, fixed = TRUE)"))

#checkComponents with a copy model
compsCopy <- Check$makeComponents(spatial = 'copy', intercepts = FALSE, datanames = c('PO','PA'), speciesintercept = NULL, speciesenvironment = TRUE,
Expand Down

0 comments on commit 85d3eb0

Please sign in to comment.