Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gen_pr_matrix_cluster

Generate condition probability matrix given clusters and probabilities


Description

Generate condition probability matrix given clusters and probabilities

Usage

gen_pr_matrix_cluster(clusters, treat_probs, simple)

Arguments

clusters

A vector of clusters

treat_probs

A vector of treatment (condition 2) probabilities

simple

A boolean for whether the assignment is a random sample assignment (TRUE, default) or complete random assignment (FALSE)

Value

a numeric 2n*2n matrix of marginal and joint condition treatment probabilities to be passed to the condition_pr_mat argument of horvitz_thompson.

See Also


estimatr

Fast Estimators for Design-Based Inference

v0.30.2
MIT + file LICENSE
Authors
Graeme Blair [aut, cre], Jasper Cooper [aut], Alexander Coppock [aut], Macartan Humphreys [aut], Luke Sonnet [aut], Neal Fultz [ctb], Lily Medina [ctb], Russell Lenth [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.