regionSegAlphaNB {biomvRCNS} | R Documentation

## Estimate matrix of dispersion parameter alpha (size) used in `regionSegCost` for negative binomial distributed `x`.

### Description

Estimate matrix of dispersion parameter alpha (size) used in `regionSegCost` for negative binomial distributed `x`.

### Usage

    regionSegAlphaNB(x, maxk = NULL, segs = NULL, useMC = FALSE, tol=1e-06)

### Arguments

`x` | The input data matrix or vector
`maxk` | Maximum number of index to search forward
`segs` | Starting indices (excluding 1) for the candidate segments, for the second stage model, `maxk` will be overridden with `length(segs)+1`.
`useMC` | TRUE if `mclapply` should be used to speed up the calculation
`tol` | tolerance level for the convergence criteria in the maximum likelihood estimation of negative binomial distribution dispersion parameter.

### Details

Estimate matrix of dispersion parameter alpha (size) used in `regionSegCost` for negative binomial distributed `x`.

### Value

Matrix with `maxk` rows and `nrow(x)` columns, or a `length(segs)+1` square matrix for the second stage model.

### References

Piegorsch, W. W. (1990). Maximum likelihood estimation for the negative binomial dispersion parameter. Biometrics, 863-867.

Robinson MD and Smyth GK (2008). Small-sample estimation of negative binomial dispersion, with applications to SAGE data. Biostatistics, 9, 321-332

### See Also

`regionSegCost`

### Examples

    	x<-matrix(rnbinom(120, size=0.05, mu=20), ncol=3)
    	Aa<-regionSegAlphaNB(x, maxk=20)
    	dim(Aa) # [1] 20 40
    	Ab<-regionSegAlphaNB(x, segs=as.integer(c(3, 6, 12, 30)))
    	dim(Ab) # [1] 5 5

[Package biomvRCNS version 1.32.0 Index]