Learn R Programming

PCL (version 1.0)

pclfit: Fit a Proximal Causal Learning Model

Description

Fit a proximal causal learning model

Usage

pclfit(pcl_object, method = "POR")

Arguments

pcl_object

an pcl object

method

method used to fit

Value

returns the average causal effect

Examples

Run this code
# NOT RUN {
n <- 100
outcome <- rnorm(n, 0, 1)
trt <- rbinom(n, 1, 0.5)
trt_pxy <- matrix(rnorm(n, 0, 1), ncol = 1)
out_pxy <- matrix(rnorm(n, 0, 1), ncol = 1)
covariates <- matrix(rnorm(n, 0, 1), ncol = 1)
pcl_object <- pcl(outcome, trt, trt_pxy, out_pxy, covariates)
fit <- pclfit(pcl_object)
# }

Run the code above in your browser using DataLab