effcop {simIReff} | R Documentation |
Fit Vine copula models to matrices of effectiveness scores
Description
Fitting of and simulation from a copula model.
Usage
effcopFit(x, eff, ...)
reffcop(n, .effcop)
Arguments
x |
a matrix or data frame of effectiveness scores to estimate dependence. |
eff |
a list of effectiveness distributions to use for the margins. |
... |
other parameters for |
n |
number of observations to simulate. |
.effcop |
the |
Value
effcopFit
: an object of class effcop
, with the following components:
data | the matrix of effectiveness scores used to fit the copula. |
pobs | the matrix of pseudo-observations computed from data . This is stored
because pseudo-observations are calculated breaking ties randomly
(see pseudo_obs ). |
margins | the list of marginal effectiveness distributions. |
cop | the underlying copulas fitted with vinecop .
|
These components may be altered to gain specific simulation capacity, such as systems with the same expected value.
reffcop
: a matrix of random scores.
See Also
effCont
and effDisc
for available distributions for the
margins. See package rvinecopulib
for details on fitting
the copulas.
Examples
## Automatically build a gaussian copula to many systems
d <- web2010p20[,1:20] # sample P@20 data from 20 systems
effs <- effDiscFitAndSelect(d, support("p20")) # fit and select margins
cop <- effcopFit(d, effs, family_set = "gaussian") # fit copula
y <- reffcop(1000, cop) # simulate new 1000 topics
# compare observed vs. expected mean
E <- sapply(effs, function(e) e$mean)
E.hat <- colMeans(y)
plot(E, E.hat)
abline(0:1)
# compare observed vs. expected variance
Var <- sapply(effs, function(e) e$var)
Var.hat <- apply(y, 2, var)
plot(Var, Var.hat)
abline(0:1)
[Package simIReff version 1.0 Index]