Skip to content

Commit

Permalink
version 2.6-9
Browse files Browse the repository at this point in the history
  • Loading branch information
mk314199 authored and cran-robot committed Feb 11, 2020
1 parent f34f72e commit d2e3cad
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 20 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pcalg
Version: 2.6-8
Date: 2019-11-18
Version: 2.6-9
Date: 2020-02-11
Title: Methods for Graphical Models and Causal Inference
Description: Functions for causal structure
learning and causal inference using graphical models. The main algorithms
Expand Down Expand Up @@ -51,6 +51,6 @@ Encoding: UTF-8
License: GPL (>= 2)
URL: http://pcalg.r-forge.r-project.org/
RoxygenNote: 6.1.1
Packaged: 2019-11-21 06:24:39 UTC; kalischm
Packaged: 2020-02-11 08:49:45 UTC; kalischm
Repository: CRAN
Date/Publication: 2019-11-21 12:00:06 UTC
Date/Publication: 2020-02-11 13:00:06 UTC
16 changes: 8 additions & 8 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1c213fc1c5a5ec68e7a5ba9293440dc3 *ChangeLog
3213adf4c383ace6ded1c77d63078929 *DESCRIPTION
37d84a7531ceea244c781882060b0d93 *DESCRIPTION
f813efd2d2208b900ae1d5ceb8dce2cf *NAMESPACE
66963591a11cfdb002f5da9070f1500b *R/Aaux.R
83c288d2212114e54bfe624e0edecaaa *R/AllClasses.R
Expand All @@ -13,12 +13,12 @@ aca17dcd6f37ce1136086a8bc285046e *R/isValidGraph.R
b363657f7e2c52dc0f2aa083780fa0f7 *R/jointIda.R
386ed9be1a524de90dfac185433b009a *R/lingamFuns.R
cc462e22779cb4c455536d1f28811eb7 *R/optAdjSet.R
8ec2d6417dc5ac6d01bc0df33a22edc4 *R/pcalg.R
af4239ca324cb48eaac6b07fc0cf0061 *R/pcalg.R
67ec62ad56d7cffaba4bee8f88797136 *R/pcalg2dagitty.R
f84d95dd282c42c32595a27ca98f9a3d *R/possDeAn.R
0db1ba6d57801a4d8fc6cdf996384a4d *R/zzz.R
d599e23940bca0203504c0fa6b09e01c *TODO
e1300b4193240403932f00f2f41019c8 *build/vignette.rds
bd68b3d89307e8260f55874d7dbcf993 *build/vignette.rds
f832779eae511757a99906c7670fc0ad *cleanup
7cbe431a233e6c454e24f7b92d63fe75 *data/datalist
1d8d4c43b9cbb9dc9dd57acd59f565bf *data/gmB.rda
Expand All @@ -32,10 +32,10 @@ f832779eae511757a99906c7670fc0ad *cleanup
4e33425acbef8bf36705d8a75622baa8 *inst/doc/mkVignettes.R
cc46b1f49edd31faf5316d5cf4d6c1ce *inst/doc/pcalgDoc.R
6581d4416f174d4d6f07a2a2d4b9d3cb *inst/doc/pcalgDoc.Rnw
2b601a85e3079b71bedd7ddaac11d0f9 *inst/doc/pcalgDoc.pdf
7c38555b6c1bbe4e36f53b8c8810e8f8 *inst/doc/pcalgDoc.pdf
01c5a9cb2024f1234d7c4aebb9762db5 *inst/doc/vignette2018.R
65ba145dfc8ae12f50c95d77a8bf8600 *inst/doc/vignette2018.Rnw
d2855fc52a011633c52bb64aac1ce1c0 *inst/doc/vignette2018.pdf
fe84a6e311f25d42e56c1f8042c8f07d *inst/doc/vignette2018.pdf
cee0b4475c720bf58c466e1495451b22 *inst/external/N_6_1000.rds
0d84fdc119d76d992b72f9bdbd0e613d *inst/external/gac-pags.rds
e7a2a9117d97986b2ab6afc6b4f77478 *inst/external/test_conservative_pc_data1.rda
Expand Down Expand Up @@ -66,7 +66,7 @@ e5e54569fa1222405f18ee7c189b68cd *man/beta.special.pcObj.Rd
297092d27f80a859b5d89a49a54926d1 *man/condIndFisherZ.Rd
b2ded6b2c0cd2cf0c30b845d07646736 *man/corGraph.Rd
14cc497daabf3441d1c1db24ef338244 *man/dag2cpdag.Rd
e57b4c2a4aec589210e386b72c2333fd *man/dag2essgraph.Rd
4cb38ff25dcd9cdf5c983da476409c8b *man/dag2essgraph.Rd
9825306a115fb2370a8bf8d481284983 *man/dag2pag.Rd
4e804b480585e6a4d57b1ac0f6100760 *man/disCItest.Rd
3d880e7f58fe68731e9ed4ecb4c13bf4 *man/dreach.Rd
Expand Down Expand Up @@ -138,7 +138,7 @@ abddab27448a30a0f87aea03c467e0ee *man/visibleEdge.Rd
a8c2ba6c143ec7747d3da847ccbcf285 *src/Makevars
f7855be23d4995a0ebe0e99735c58b3b *src/Makevars.win
2ced878a9b224e806d51885fafbfa64d *src/constraint.cpp
f52c777a307fc3b3e79ca73cb0dc7f86 *src/gies.cpp
2bfeff52f98baadffa6d9f833dee0195 *src/gies.cpp
35da0b2746092325096fa471446e465e *src/greedy.cpp
c5e0eb959f4162f8655ea795eec34c50 *src/init.c
bc5cab68e323949bed42d3d87b68e5a2 *src/score.cpp
Expand Down Expand Up @@ -186,7 +186,7 @@ ecaacf0c68bf72d9d96eeeeffd824357 *tests/test_pcorOrder.R
420318727caccce9211b4f19293e72c5 *tests/test_randDAG.Rout.save
aee8ad2108a151b25666eaf0ed1b4205 *tests/test_randomDAG.R
67e98859e85bd2237f9856a8209711e4 *tests/test_rfci.R
5ff76c5a7b0205bda339e9a159466ff8 *tests/test_rmvDAG.R
aca0d1fb3b38a6f54fb2d84040aa009d *tests/test_rmvDAG.R
c1564ccaf570fb24d5e19ffd8d8e4d04 *tests/test_shd.R
ebc96d20c469e51fc26a7a7c622b82b3 *tests/test_skeleton.R
8a4bb227766e6d42a944ae1bd3df57b0 *tests/test_udag2pag.R
Expand Down
2 changes: 1 addition & 1 deletion R/pcalg.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ rmvDAG <-
colnames(errMat) <- nodes(dag) # == colnames(weightMatrix)

## compute X matrix X_i
if (sum(weightMatrix) > 0) {
if (sum(weightMatrix != 0) > 0) {
X <- errMat
for (j in 2:p) { ## uses X[*, 1:(j-1)] -- "recursively" !
ij <- 1:(j-1)
Expand Down
Binary file modified build/vignette.rds
Binary file not shown.
Binary file modified inst/doc/pcalgDoc.pdf
Binary file not shown.
Binary file modified inst/doc/vignette2018.pdf
Binary file not shown.
7 changes: 2 additions & 5 deletions man/dag2essgraph.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dag2essgraph(dag, targets = list(integer(0)))
}
\arguments{
\item{dag}{The DAG whose essential graph has to be calculated. Different
representations are possible: \code{dag} can be an adjacency matrix, an
object of \code{\linkS4class{graphNEL}} (package \pkg{graph}), or
representations are possible: \code{dag} can be an
object of \code{\linkS4class{graphNEL}} (package \pkg{graph}) or
an instance of a class derived from \code{\linkS4class{ParDAG}}.}

\item{targets}{List of intervention targets with respect to which the
Expand Down Expand Up @@ -43,7 +43,6 @@ dag2essgraph(dag, targets = list(integer(0)))
\value{
Depending on the class of \code{dag}, the essential graph is returned as
\itemize{
\item{an adjacency matrix, if \code{dag} is an adjacency matrix}
\item{an instance of \code{\linkS4class{graphNEL}}, if \code{dag} is an
instance of \code{graphNEL},}
\item{an instance of \code{\linkS4class{EssGraph}}, if \code{dag} is
Expand Down Expand Up @@ -80,8 +79,6 @@ res.obs <- dag2essgraph(dag)
## Different argument classes
res2 <- dag2essgraph(as(dag, "GaussParDAG"))
str(res2)
res3 <- dag2essgraph(as(dag, "matrix"))
str(res3)

## Calculate interventional essential graph for intervention targets
## {1} and {3}
Expand Down
4 changes: 2 additions & 2 deletions src/gies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Main file of the Greedy Interventional Equivalence Search library for R
*
* @author Alain Hauser
* $Id: gies.cpp 500 2019-11-20 13:46:14Z alhauser $
* $Id: gies.cpp 501 2019-11-21 07:28:17Z alhauser $
*/

#include <vector>
Expand Down Expand Up @@ -413,7 +413,7 @@ RcppExport SEXP causalInference(
int phaseCount(1);
do {
cont = false;
for (int i = 0; i < phases.size(); ++i) {
for (uint i = 0; i < phases.size(); ++i) {
for (steps.push_back(0);
graph.greedyDAGStepDir(phases[i]);
steps.back()++) {
Expand Down
11 changes: 11 additions & 0 deletions tests/test_rmvDAG.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
library(pcalg)
suppressWarnings(RNGversion("3.5.0"))

## bugfix 02.05.2020 ####
set.seed(542) ## seed=542 und p=2; seed=20499 und p=3
p <- 2 ## 20
rDAG <- randomDAG(p, prob = 0.2, lB=-1, uB=1)
B <- as(rDAG, "matrix")
cov.th <- t(solve(diag(p) - B)) %*% solve(diag(p) - B)
data <- rmvDAG(1e4, rDAG, errDist = "normal")
stopifnot(cov(data)[2,2] > 1.6)
##

set.seed(100)

wmat <- rbind(c(0,1,0,0,0),
Expand Down

0 comments on commit d2e3cad

Please sign in to comment.