R/is.bayesian.R

Defines functions is.bayesian

Documented in is.bayesian

###########################################################################
# is.bayesian                                                             #
#                                                                         #
# The purpose of the is.bayesian function is to determine whether or not  #
# a model is Bayesian by comparing the log-posterior (LP) and the LL.     #
###########################################################################

is.bayesian <- function(Model, Initial.Values, Data)
     {
     if(missing(Model)) stop("The Model argument is required.")
     if(missing(Initial.Values))
          stop("The Initial.Values argument is required.")
     if(missing(Data)) stop("The Data argument is required.")
     bayesian <- FALSE
     Mo <- Model(Initial.Values, Data)
     LL <- Mo[["Dev"]] / -2
     if(Mo[["LP"]] != LL) bayesian <- TRUE
     return(bayesian)
     }

#End

Try the LaplacesDemon package in your browser

Any scripts or data that you put into this service are public.

LaplacesDemon documentation built on July 9, 2021, 5:07 p.m.