salbalkus / CausalTables.jl

A new type of Table to store and simulate data for causal inference in Julia.
https://salbalkus.github.io/CausalTables.jl/
MIT License
0 stars 0 forks source link

Incorrect vectorized distribution syntax fails silently #15

Open salbalkus opened 7 months ago

salbalkus commented 7 months ago

The code

distseq = @dgp(
        L ~ DiscreteUniform(1, 5),
        A ~ @. Normal(:L + 2, 1),
        Y ~ @. Normal(:A + :L + 2, 1)
    );

Only creates L and A variables. The problem is that the @. operator continues on to the next line and destroys the syntax. The package needs some way to handle this (and prevent users from adding complicated distributional structures that don't fit in a Table).