Replaces the learned causal margin P(Y|do(X)) with a user-specified function. This allows generating joint data with a known causal effect while preserving the learned marginal P(X,Z) and association structure.
Examples
# \donttest{
model <- frengression(x_dim = 1, y_dim = 1, z_dim = 1)
#> Error: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
# Linear causal effect: Y = 5*X + noise
model <- specify_causal(model, function(x, eta) 5 * x + eta)
#> Error: object 'model' not found
# }