utils_likelihood {kfino}R Documentation

utils_likelihood a function to calculate a likelihood on initial parameters optimized by a grid search

Description

utils_likelihood a function to calculate a likelihood on initial parameters optimized by a grid search

Usage

utils_likelihood(param, kappaOpt = 7, Y, Tps, N, scalingC)

Arguments

param

list, see initial parameter list in kfino_fit

kappaOpt

numeric, truncation setting for initial parameters' optimization, default 7

Y

character, name of the numeric variable to predict in the data.frame datain

Tps

character, time column name in the data.frame datain, a numeric vector. Tvar can be expressed as a proportion of day in seconds

N

numeric, length of the numeric vector of Y values

scalingC

numeric, scaling constant. To be changed if the function is not able to calculate the likelihood because the number of data is large

Details

utils_likelihood is a tool function used in the main kfino_fit function. It uses the same input parameter list than the main function.

Value

a likelihood

Examples

set.seed(1234)
Y<-rnorm(n=10,mean=50,4)
Tps<-seq(1,10)
N=10
param2<-list(m0=41,
             mm=45,
             pp=0.5,
             aa=0.001,
             expertMin=30,
             expertMax=75,
             sigma2_m0=1,
             sigma2_mm=0.05,
             sigma2_pp=5,
             K=2,
             seqp=seq(0.5,0.7,0.1))
print(Y)
utils_likelihood(param=param2,kappaOpt=7,Y=Y,Tps=Tps,N=N,scalingC=6)

[Package kfino version 1.0.0 Index]