ims40 - Bivariate Moment Generating Function

preview_player
Показать описание

Help this channel to remain great! Donating to Patreon or Paypal can do this!
Рекомендации по теме
Комментарии
Автор

# see video "Symbolic Derivatives Using Base R Software"
DD <- function(expr, name, order = 1) {
if(order < 1) stop("'order' must be >= 1")
if(order == 1) D(expr, name)
else DD(D(expr, name), name, order - 1)
}



m.xy.t1 <- DD(mxy, "t1", 1)
m.xy.t1.t1 <- DD(mxy, "t1", 2)
m.xy.t1.t2 <- D(D(mxy, "t1"), "t2")
m.xy.t13.t22 <- DD(DD(mxy, "t1", 3), "t2", 2)

t1<-t2<-0
eval(m.xy.t1)
eval(m.xy.t1.t1)
sigma11+mu1^2
eval(m.xy.t1.t2)
sigma12+mu1*mu2
# E(X^3 Y^2)
eval(m.xy.t13.t22)

statisticsmatt