linear_hypothesis: Test Linear Hypotheses for Posterior Samples

Description Usage Arguments Value Examples

View source: R/linear_hypothesis.R

Description

Test Linear Hypotheses for Posterior Samples

Usage

1
2
3
4
5
6
7
8
9
linear_hypothesis(
  lin_comb,
  obj,
  cred = 0.95,
  sub_model = NULL,
  print_names = FALSE,
  rope = NULL,
  contrast = NULL
)

Arguments

lin_comb

A string specifying a linear combination of variables, or a list of variable names if using contrast.

obj

An object of class blsmeta

cred

The level for which a credible interval should be computed.

sub_model

character. Which sub-model for the hypotheses, with options including location and scale. The defaul is NULL, so either is required.

print_names

logical. Should the parameter names be printed ? This is useful for specifying the hypotheses, as the names need to be exact.

rope

Specify a ROPE. Optional.

contrast

A contrast matrix specifying which combinations to test. Optional.

Value

An object of class linear_hypothesis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(psymetadata)

fit <-  blsmeta(yi = yi, 
                vi = vi, 
                es_id = es_id,
                study_id = study_id,
                data = gnambs2020)
                
linear_hypothesis(obj = fit, 
                  lin_comb = "scale3_Intercept > scale2_Intercept",
                  sub_model = "scale")

donaldRwilliams/blsmeta documentation built on Dec. 20, 2021, 12:12 a.m.