estimateTheta {TopKSignal} | R Documentation |
Estimation of the underlying signal.
Description
The main function for the estimation of the signals informing the ranks is called estimateTheta(). The required parameters are: (1) a rank matrix, (2) the number of bootstrap samples (500 is recommended), (3) a constant for the support variables \(b>0\), default is 0.1, (4) the type of optimization technique: fullLinear, fullQuadratic, restrictedLinear, and restrictedQuadratic (the latter two recommended), (5) the type of bootstrap sampling scheme: classic.bootstrap and poisson.bootstrap (recommended), and (6) the number of cores for parallel computation. Each bootstrap sample is executed on a dedicated CPU core.
Usage
estimateTheta(
R.input,
b,
num.boot,
solver,
type,
bootstrap.type,
nCore = ((detectCores() - 1))
)
Arguments
R.input |
A matrix where the rows represent the objects and the columns the assessors (rankers). |
b |
The penalization term. The suggested value is 0.1. |
num.boot |
The number of boostrap samples created from the input ranked matrix. A positive number is expected. |
solver |
A string that indicates which solver to use. Two options are available, 'gurobi' and 'nloptr'. We recommend to use gurobi for faster computation. Note, a licence is required. Check the corresponding documentation on how to install gurobi. |
type |
A string that indicates which model to use: four approaches are available: 'restrictedQuadratic', 'fullQuadratic', 'restrictedLinear' and 'fullLinear'. |
bootstrap.type |
A string that indicates which bootstrap method to use: 'classic.bootstrap' or 'poisson.bootstrap'. |
nCore |
The number of cores used for computation. Each core is used to calculate the signals from a bootstrap sample. Default number is detectCores() - 1. |
Value
A list with the estimation information obtained:
estimation - A data frame with the signal estimation and the standard error computed by the bootstrap for each object
estimatedMatrixNoise - The estimated matrix noise
time - The execution time of the procedure
allBootstraps - The signal estimates from all bootstrap iterations
Examples
library(TopKSignal)
set.seed(1421)
p = 8
n = 10
input <- generate.rank.matrix(p, n)
rownames(input$R.input) <- c("a","b","c","d","e","f","g","h")
# For the following code Gurobi needs to be installed
## Not run:
estimatedSignal <- estimateTheta(R.input = input$R.input, num.boot = 50, b = 0.1,
solver = "gurobi", type = "restrictedQuadratic", bootstrap.type = "poisson.bootstrap",nCore = 1)
## End(Not run)
data(estimatedSignal)
estimatedSignal