idx: Convert indexes

Description Usage Arguments Value Author(s) Examples

Description

Convert indexes given by to triplet '(idx, group, replicate)' to the (one-dimensional) index used in the grouped and replicated model

Usage

1
2
3
inla.idx(idx, n = max(idx),
         group = rep(1, length(idx)), ngroup = max(group),
         replicate = rep(1, length(idx)),  nrep = max(replicate)) 

Arguments

idx

The index within the basic model. (Legal values from ‘1’ to ‘n’.)

n

The length ‘n’ of the basic model.

group

The index within group. (Legal values from ‘1’ to ‘ngroup’.)

ngroup

Number of groups.

replicate

The index within replication. (Legal values from ‘1’ to ‘nrep’.)

nrep

Number of replications.

Value

inla.idx returns indexes in the range ‘1’ to ‘n*ngroup*nrep’ representing where the triplet ‘(idx,group,replicate)’ is stored internally in the full grouped and replicated model.

Author(s)

Havard Rue hrue@r-inla.org

Examples

1
##TODO

inbo/INLA documentation built on Dec. 6, 2019, 9:51 a.m.

Related to idx in inbo/INLA...