summarise.adjustr_weighted | R Documentation |
Uses weights computed in adjust_weights
to compute posterior
summary statistics. These statistics can be compared against their reference
values to quantify the sensitivity of the model to aspects of its
specification.
## S3 method for class 'adjustr_weighted' summarise(.data, ..., .resampling = FALSE, .model_data = NULL) ## S3 method for class 'adjustr_weighted' summarize(.data, ..., .resampling = FALSE, .model_data = NULL)
.data |
An |
... |
Name-value pairs of expressions. The name of each argument will be
the name of a new variable, and the value will be computed for the
posterior distribution of eight alternative specification. For example,
a value of Also supported is the custom function The arguments in |
.resampling |
Whether to compute summary statistics by first resampling
the data according to the weights. Defaults to |
.model_data |
Stan model data, if not provided in the earlier call to
|
An adjustr_weighted
object, with the new columns specified in
...
added.
adjust_weights
, spec_plot
## Not run: model_data = list( J = 8, y = c(28, 8, -3, 7, -1, 1, 18, 12), sigma = c(15, 10, 16, 11, 9, 11, 10, 18) ) spec = make_spec(eta ~ student_t(df, 0, 1), df=1:10) adjusted = adjust_weights(spec, eightschools_m) summarize(adjusted, mean(mu), var(mu)) summarize(adjusted, wasserstein(mu, p=2)) summarize(adjusted, diff_1 = mean(y[1] - theta[1]), .model_data=model_data) summarize(adjusted, quantile(tau, probs=c(0.05, 0.5, 0.95))) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.