mean.sgd: Mean for Single Gaussian Data

Description Usage Arguments Value Examples

Description

Mean for Single Gaussian Data

Usage

1
2
## S3 method for class 'sgd'
mean(x, ref_mean = 0, ref_precision = 1, ...)

Arguments

x

An object of class sgd.

ref_mean

A scalar giving the mean of the Gaussian distribution used as reference for the Bayes space (default: 0).

ref_precision

A scalar giving the precision (inverse of the variance) of the Gaussian distribution used as reference for the Bayes space (default: 1). This should be a strictly positive value.

Value

A named length-2 numeric vector providing the mean and precision of the mean Gaussian distribution of the data set.

Examples

1
2
3
4
5
6
x <- sgd(
  c(mean =  0, precision = 1  ),
  c(mean =  3, precision = 0.5),
  c(mean = -1, precision = 2)
)
mean(x)

astamm/game documentation built on June 5, 2019, 8:53 a.m.