Closed jangorecki closed 8 years ago
Also copula
package:
> # Bivariate uniform copula using copula package (correlation coef 0.75):
> require("copula")
Loading required package: copula
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘copula’
Also bindata
package:
> # Same as "A.Bin1" and "A.Bin2", but directly using rmvbin function in bindata package:
> require("bindata")
Loading required package: bindata
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘bindata’
> D <- DAG.empty()
> D <- D +
+ node(c("B.Bin1","B.Bin2"), distr = "rmvbin",
+ margprob = c(0.5, 0.5),
+ bincorr = matrix(c(1,0.75,0.75,1), ncol=2))
Error in node(c("B.Bin1", "B.Bin2"), distr = "rmvbin", margprob = c(0.5, :
rmvbin: this node distribution function could not be located
Execution halted
Indeed, thanks for bringing this up. Fixed now.
There is an attempt to load
mvtnorm
namespace in examples - https://github.com/osofr/simcausal/blob/d0c5d8b721358b38cb1db1bca78621ea8ead2f33/man/node.Rd#L285 Asmvtnorm
is suggested dependency, it should not be required to run examples according to R-exts. This can be conditionally escaped with requireNamespace. It is possible there are other cases of that issue in other examples, this one was to first that fails.