fit: A function to fit the model.

Description Usage Arguments Value

Description

Fit a NMA model to the data.

A function to fit the model.

Usage

1
2
3
4
5
6
fit(object, ...)

## S4 method for signature 'nmadasmodel'
fit(object, data, S.ID, T.ID, Comparator = "NA",
  tp = NULL, fn = NULL, tn = NULL, fp = NULL, cores = 3, chains = 3,
  iter = 6000, warmup = 1000, thin = 10, ...)

Arguments

...

Other optional parameters as specified in stan.

data

A data-frame with no missing values containg TP, TN, FP, FN, SID and TID.

Comparator

The name of the comparator test when relative sensitivity and specificity are required. By default the first test as arranged alphabetically is the comparator.

tp

A string indicating the name of the columnt with the true positives.

fn

A string indicating the name of the columnt with the false negatives.

tn

A string indicating the name of the columnt with the true negatives.

fp

A string indicating the name of the columnt with the false positives.

cores

A positive numeric values specifying the number of cores to use to execute parallel sampling. When the hardware has more at least 4 cores, the default is 3 cores and otherwise 1 core.

chains

A positive numeric value specifying the number of chains, default is 3.

iter

A positive numeric value specifying the number of iterations per chain. The default is 6000.

warmup

A positive numeric value (<iter) specifying the number of iterations to be discarded(burn-in/warm-up). The default is 1000.

thin

A positive numeric value specifying the interval in which the samples are stored. The default is 10.

nma.model

A model written in the stan format from nmadasmodel. If the model is not specified, a hierachical beta-binomial model with frank copula is fitted.

SID

A string indicating the name of the column with the study identifier.

TID

A string indicating the name of the column with the test identifier.

Value

An object of nmadasfit class.


VNyaga/NMADAS documentation built on May 6, 2019, 11:20 a.m.