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 adjustr_weighted
summarise(.data, ..., .resampling = FALSE, .model_data = NULL)

summarize(.data, ..., .resampling = FALSE, .model_data = NULL)

## Arguments

.data An adjustr_weighted object. 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 mean(theta) will compute the posterior mean of theta for each alternative specification. Also supported is the custom function wasserstein, which computes the Wasserstein-p distance between the posterior distribution of the provided expression under the new model and under the original model, with p=1 the default. Lower the spacing parameter from the default of 0.005 to compute a finer (but slower) approximation. The arguments in ... are automatically quoted and evaluated in the context of .data. They support unquoting and splicing. Whether to compute summary statistics by first resampling the data according to the weights. Defaults to FALSE, but will be used for any summary statistic that is not mean, var or sd. Stan model data, if not provided in the earlier call to adjust_weights.

## Value

An adjustr_weighted object, wth the new columns specified in ... added.

adjust_weights, spec_plot

## Examples

if (FALSE) {
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)
{"ft_lang_label":"__label__en","ft_lang_prob":0.61577946,"math_prob":0.9725063,"size":1449,"snap":"2021-31-2021-39","text_gpt3_token_len":410,"char_repetition_ratio":0.13979238,"word_repetition_ratio":0.03846154,"special_character_ratio":0.2926156,"punctuation_ratio":0.25597268,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9803441,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-08-03T17:41:17Z\",\"WARC-Record-ID\":\"<urn:uuid:55bb4948-6399-4acd-8d0c-4c68aae1a4bb>\",\"Content-Length\":\"14838\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f472e384-c9ea-469e-8864-7241879cf9f1>\",\"WARC-Concurrent-To\":\"<urn:uuid:1e10e6e6-2b28-430a-aa7c-f07b95ce1b80>\",\"WARC-IP-Address\":\"185.199.110.153\",\"WARC-Target-URI\":\"https://corymccartan.github.io/adjustr/reference/summarize.adjustr_weighted.html\",\"WARC-Payload-Digest\":\"sha1:MZQW46XNWUQ435SG4T6TTV2QCGBWP7NV\",\"WARC-Block-Digest\":\"sha1:7Y4YVAWCAWG4BRUI676FMOUIVIEJDKW3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-31/CC-MAIN-2021-31_segments_1627046154466.61_warc_CC-MAIN-20210803155731-20210803185731-00483.warc.gz\"}"}