Reports whether x is a a prior object. Note that point priors inherit the prior.simple property
is.prior(x)
is.prior.point(x)
is.prior.none(x)
is.prior.simple(x)
is.prior.discrete(x)
is.prior.vector(x)
is.prior.PET(x)
is.prior.PEESE(x)
is.prior.weightfunction(x)
is.prior.factor(x)
is.prior.orthonormal(x)
is.prior.treatment(x)
is.prior.independent(x)
is.prior.spike_and_slab(x)
is.prior.meandif(x)
an object of test
returns a boolean indicating whether the test object is a prior (of specific type).
# create some prior distributions
p0 <- prior(distribution = "point", parameters = list(location = 0))
p1 <- prior_PET(distribution = "normal", parameters = list(mean = 0, sd = 1))
is.prior(p0)
#> [1] TRUE
is.prior.simple(p0)
#> [1] TRUE
is.prior.point(p0)
#> [1] TRUE
is.prior.PET(p0)
#> [1] FALSE
is.prior(p1)
#> [1] TRUE
is.prior.simple(p1)
#> [1] TRUE
is.prior.point(p1)
#> [1] FALSE
is.prior.PET(p1)
#> [1] TRUE