R Under development (unstable) (2023-08-05 r84874 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(efdm) > # Test that prior is not dependent on the order of statespace > statespace <- expand.grid(a=1:2, b=1:2, vol=1:15, age=1:35) > statespace <- statespace[sample(nrow(statespace), nrow(statespace)),] > > act <- define_activity("test", c("vol", "age")) > act1 <- estimatetransprobs(c("vol", "age"), NULL, statespace, by=c("a", "b"), prior=prior_ff()) > A <- transprobs(act1) > stopifnot(all(A$vol1==1 & A$age1 == 1)) > > act <- define_activity("test", c("vol", "age")) > act1 <- estimatetransprobs(c("vol", "age"), NULL, statespace, factors=c("a", "b"), prior=prior_ff()) > A <- transprobs(act1) > stopifnot(all(A$vol1==1 & A$age1 == 1)) > > act <- define_activity("test", c("vol", "age")) > act1 <- estimatetransprobs(c("vol", "age"), NULL, statespace, factors=c("b"), by="a", prior=prior_ff()) > A <- transprobs(act1) > stopifnot(all(A$vol1==1 & A$age1 == 1)) > > proc.time() user system elapsed 0.37 0.06 0.43