learnMoTBFpriorInformation {MoTBFs} | R Documentation |
Incorporating prior knowledge in the estimation process
Description
Learns a univariate MoTBF function using prior information.
Usage
learnMoTBFpriorInformation(
priorData,
data,
s,
POTENTIAL_TYPE,
domain = range(data),
coeffversion = 4,
restrictDomain = TRUE,
maxParam = NULL
)
Arguments
priorData |
A |
data |
A |
s |
A |
POTENTIAL_TYPE |
A |
domain |
A |
coeffversion |
A |
restrictDomain |
A logical value. This argument allows to choose if the domain is used joining both domains,
the prior one and the data domain or trimming them. By default, |
maxParam |
A positive integer which indicates the maximum number of coefficients in the function.
If specified, the output is the function which gets the best BIC with, at most, this number of parameters.
By default, it is set to |
Value
A list with the elements
coeffs |
An |
posteriorFunction |
The final function after combining. |
priorFunction |
The fit of the prior data. |
dataFunction |
The fit of the original data. |
rangeNewPriorData |
A |
See Also
Examples
## Data
X <- rnorm(15)
## Prior Data
priordata <- rnorm(5000)
## Test data
test <- rnorm(1000)
testData <- test[test>=min(X)&test<=max(X)]
## Learning
type <- "MOP"
confident <- 3 ## confident <- 1,2,...,length(X)
f <- learnMoTBFpriorInformation(priorData = priordata, data = X, s = confident,
POTENTIAL_TYPE = type)
attributes(f)
## Log-likelihood
sum(log(as.function(f$dataFunction)(testData)))
sum(log(as.function(f$posteriorFunction)(testData))) ## best loglikelihood