Description Usage Arguments Value Author(s) Examples
This is the estimation algorithm for generalized linear model with negative binomial responses and log link function. Sore functions are modified properly such that bias in the coefficients are reduced.
| 1 2 3 4 5 6 7 | fbrNBglm.fit(x, y, weights = rep(1, length(y)), offset = rep(0, length(y)),
  family, odisp, control = fbrNBglm.control())
fbrNBglm.control(standardizeX = TRUE, coefOnly = TRUE,
  solvers = nlSolvers, verbose = FALSE, maxit = 25L, start = NULL,
  infoParms = list(j = 1, k = 1, m = 1), order = 2L,
  tol = sqrt(.Machine$double.eps), qr.tol = tol)
 | 
| x, y, weights, offset | Defined the same as in  | 
| family | The same as in  | 
| odisp | A numeric scalar of negative binomial over-dispersion parameter. 
This is the same as  | 
| control | A list returned from  | 
| standardizeX | A logical scalar. If  | 
| coefOnly | A logical scalar. If  | 
| solvers | The non-linear equation solvers to be used if iterative fitting is necessary. | 
| verbose | A logical scalar, indicating whether intermediate messages should be printed. | 
| maxit | A positive integer, the maximum number of iterations allowed if iterative fitting is necessary. | 
| start | A numeric vector of starting values, with length being the
same as the number of columns of  | 
| infoParms | A list of three components, named  | 
| order | A positive integer. Usually this should be set to 2, 
indicating the second order, i.e., O(n^{-1}) bias 
being reduced by the adjustment. For one-way design, if  | 
| tol | Small positive integer, indicating the desired accuracy of parameter estimates. | 
| qr.tol | The same as the  | 
It depends.
Long Qu <rtistician@gmail.com>
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |  ## prepare example data
 data(mockRNASeqData)
 x=mockRNASeqData$design.matrix
 y=mockRNASeqData$counts[3462,]
 offset = log(mockRNASeqData$estimated.normalization)
 overDisp = mockRNASeqData$estimated.nbdisp[3462]
 nbfam = negbin('log', overDisp)
 
 ## usual maximum likelihood estimate
 coef(glm.fit(x, y, offset=offset, family=nbfam))
 
 ## 2nd-order biased reduced fit with observed information
 ctrl= fbrNBglm.control(infoParms=list(j=1,k=1,m=1), order=2L, coefOnly=TRUE)
 fbrNBglm.fit(x, y, offset=offset, family=nbfam, control=ctrl)
 ## 2nd-order biased reduced fit with expected information
 ctrl= fbrNBglm.control(infoParms=list(j=0,k=1,m=1), order=2L, coefOnly=TRUE)
 fbrNBglm.fit(x, y, offset=offset, family=nbfam, control=ctrl)
 
 ## 3rd-order biased reduced fit with observed information
 ## Not available yet if offsets are non-constants with a treatment
 offset.avg = ave(offset, mockRNASeqData$treatment)
 ctrl= fbrNBglm.control(infoParms=list(j=1,k=1,m=1), order=3L, coefOnly=TRUE)
 fbrNBglm.fit(x, y, offset=offset.avg, family=nbfam, control=ctrl)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.