У меня есть две преобразованные числовые переменные (Ux и Uz), на которых я пытаюсь выполнить моделирование связок и создать лямбда-график. Я использую приведенный ниже код и получаю ошибки. Я применяю этот же код к другим функциям распределения, таким как gumbel, и он работает.
# Define copulas
joe <-BiCop(6,par = 1) # Joe
# Gaussian
cop <- BiCop(1, par = 0)
gau<-BiCopSim(1000,cop)
#################
# Graph copulas #
#################
# Empirical data
BiCopLambda(Ux,Uz,family = "emp",PLOT = TRUE, col="blue",cex.main=1,
cex.lab=0.7, cex.axis=0.7,cex=0.7)
#Joe copula
par(new=T)
BiCopLambda(joe, col="orange",cex.main=1, cex.lab=0.7,
cex.axis=0.7,cex=0.7)
# Gaussian copula
par(new=T)
BiCopLambda(Uy,Uz,gau[, 1], gau[, 2], col="grey",cex.main=1, cex.lab=0.7,
cex.axis=0.7,cex=0.7)
### Joe copula error
> Error in BiCopLambda(joe, col = "orange", cex.main = 1, cex.lab = 0.7, :
Lengths of 'u1' and 'u2' do not match.
### Gaussian error
> Error in BiCopLambda(Uy, Uz, gau[, 1], gau[, 2], col = "grey", cex.main =
1, :
Copula family not implemented.
In addition: Warning message:
In if (!(family %in% c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, "emp")))
stop("Copula family not implemented.") :
the condition has length > 1 and only the first element will be used