QuadraticEstimatingEquations/R/V.gauss.R

34 lines
1.3 KiB
R
Raw Normal View History

2014-02-24 02:05:36 +00:00
# V Matrix (gaussian)
#
# Author: Francois Pelletier
#
# LGPL-3.0
###############################################################################
#' V Matrix (gaussian)
#' @param Y Individual data sample
#' @param param Vector of parameters of the distribution function
#' @param meanf Mean function of the distribution
#' @param variancef Variance function of the distribution
#' @param skewnessf Skewness function of the distribution
#' @param kurtosisf Kurtosis function of the distribution
#' @param dmean Derivative in respect to the parameter vector of the mean function of the distribution
#' @param dsd Derivative in respect to the parameter vector of the standard deviation function of the distribution
#' @return V Matrix
#' @export V.gauss
2014-02-24 02:05:36 +00:00
#' @author Francois Pelletier
V.gauss <- function(param,Y,meanf,variancef,skewnessf,kurtosisf,dmean,dsd)
{
2014-02-24 02:51:20 +00:00
(variancef(param)*(a.gauss(param,variancef,dmean) %o%
a.gauss(param,variancef,dmean) +
2014-02-24 02:05:36 +00:00
sqrt(variancef(param)) * skewnessf(param) *
2014-02-24 02:51:20 +00:00
(a.gauss(param,variancef,dmean) %o%
b.gauss(param,variancef,dsd) +
b.gauss(param,variancef,dsd) %o%
a.gauss(param,variancef,dmean)) +
2014-02-24 02:05:36 +00:00
variancef(param)*(kurtosis(param)+2) *
2014-02-24 02:51:20 +00:00
b.gauss(param,variancef,dsd) %*%
t(b.gauss(param,variancef,dsd))))
2014-02-24 02:05:36 +00:00
}