Evalautes the mean function defined in ModelInfo, with the parameters given in theta, at the points given by the vector x.

mu_meanfunction(ModelInfo, theta, x)

Arguments

ModelInfo

A row from the output of set_models(), containing the mean_function and error distribution of the model in question. Or a string in the form of "meanfun_errdist".

theta

Vector containing parameter values of model.

x

Values at which to calculate the mean function.

Value

Calculates the constant mean functions defined by thetaM at points x.

Examples


Models <- set_models (mean_fun=c("gaussian"), err_dist=c("negbin"))
mu_meanfunction (ModelInfo=Models[1,], theta=c(H=60, m=50, s=10, phi=1.5), x=0:100)
#>   [1] 2.235992e-04 3.668141e-04 5.957703e-04 9.580070e-04 1.525161e-03
#>   [6] 2.403918e-03 3.751290e-03 5.795605e-03 8.864902e-03 1.342475e-02
#>  [11] 2.012776e-02 2.987733e-02 4.390815e-02 6.388597e-02 9.202864e-02
#>  [16] 1.312495e-01 1.853229e-01 2.590704e-01 3.585614e-01 4.913221e-01
#>  [21] 6.665398e-01 8.952472e-01 1.190466e+00 1.567285e+00 2.042847e+00
#>  [26] 2.636216e+00 3.368086e+00 4.260321e+00 5.335297e+00 6.615032e+00
#>  [31] 8.120117e+00 9.868467e+00 1.187392e+01 1.414476e+01 1.668224e+01
#>  [36] 1.947915e+01 2.251867e+01 2.577344e+01 2.920514e+01 3.276447e+01
#>  [41] 3.639184e+01 4.001861e+01 4.356894e+01 4.696227e+01 5.011621e+01
#>  [46] 5.294981e+01 5.538698e+01 5.735985e+01 5.881192e+01 5.970075e+01
#>  [51] 6.000000e+01 5.970075e+01 5.881192e+01 5.735985e+01 5.538698e+01
#>  [56] 5.294981e+01 5.011621e+01 4.696227e+01 4.356894e+01 4.001861e+01
#>  [61] 3.639184e+01 3.276447e+01 2.920514e+01 2.577344e+01 2.251867e+01
#>  [66] 1.947915e+01 1.668224e+01 1.414476e+01 1.187392e+01 9.868467e+00
#>  [71] 8.120117e+00 6.615032e+00 5.335297e+00 4.260321e+00 3.368086e+00
#>  [76] 2.636216e+00 2.042847e+00 1.567285e+00 1.190466e+00 8.952472e-01
#>  [81] 6.665398e-01 4.913221e-01 3.585614e-01 2.590704e-01 1.853229e-01
#>  [86] 1.312495e-01 9.202864e-02 6.388597e-02 4.390815e-02 2.987733e-02
#>  [91] 2.012776e-02 1.342475e-02 8.864902e-03 5.795605e-03 3.751290e-03
#>  [96] 2.403918e-03 1.525161e-03 9.580070e-04 5.957703e-04 3.668141e-04
#> [101] 2.235992e-04