View source: R/diagnosis_helper_functions.R

reshape_diagnosis | R Documentation |

Take a diagnosis object and returns a pretty output table. If diagnosands are bootstrapped, se's are put in parentheses on a second line and rounded to `digits`

.

reshape_diagnosis(diagnosis, digits = 2, select = NULL, exclude = NULL)

`diagnosis` |
A diagnosis object generated by |

`digits` |
Number of digits. |

`select` |
List of columns to include in output. Defaults to all. |

`exclude` |
Set of columns to exclude from output. Defaults to none. |

A formatted text table with bootstrapped standard errors in parentheses.

effect_size <- 0.1 design <- declare_model( N = 100, U = rnorm(N), X = rnorm(N), potential_outcomes(Y ~ effect_size * Z + X + U) ) + declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) + declare_assignment(Z = complete_ra(N)) + declare_measurement(Y = reveal_outcomes(Y ~ Z)) + declare_estimator(Y ~ Z, inquiry = "ATE", label = "unadjusted") + declare_estimator(Y ~ Z + X, inquiry = "ATE", label = "adjusted") diagnosis <- diagnose_design(design, sims = 100) reshape_diagnosis(diagnosis) reshape_diagnosis(diagnosis, select = c("Bias", "Power"))

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.