glmFAB.Rd
asymptotic FAB p-values and confidence intervals for parameters in generalized linear regression models
glmFAB(cformula, FABvars, lformula = NULL, alpha = 0.05, silent = FALSE, ...)
cformula | formula for the control variables |
---|---|
FABvars | matrix of regressors for which to make FAB p-values and CIs |
lformula | formula for the linking model (just specify right-hand side) |
alpha | error rate for CIs (1-alpha CIs will be constructed) |
silent | show progress (TRUE) or not (FALSE) |
... | additional arguments to be passed to |
an object of the class glmFAB
which inherits from glm
Peter Hoff
# n observations, p FAB variables, q=2 control variables n<-100 ; p<-25 # X is design matrix for params of interest # beta is vector of true parameter values # v a variable in the linking model - used to share info across betas v<-rnorm(p) ; beta<-(2 - 2*v + rnorm(p))/3 ; X<-matrix(rnorm(n*p),n,p)/8 # control coefficients and variables alpha1<-.5 ; alpha2<- -.5 w1<-rnorm(n)/8 w2<-rnorm(n)/8 # simulate data lp<-1 + alpha1*w1 + alpha2*w2 + X%*%beta y<-rpois(n,exp(lp)) # fit model fit<-glmFAB(y~w1+w2,X,~v,family=poisson)#> #> Fitting sampling model: - Fitting sampling model: # #> Fitting linking models: #------------------------ Fitting linking models: ##----------------------- Fitting linking models: ###---------------------- Fitting linking models: ####--------------------- Fitting linking models: #####-------------------- Fitting linking models: ######------------------- Fitting linking models: #######------------------ Fitting linking models: ########----------------- Fitting linking models: #########---------------- Fitting linking models: ##########--------------- Fitting linking models: ###########-------------- Fitting linking models: ############------------- Fitting linking models: #############------------ Fitting linking models: ##############----------- Fitting linking models: ###############---------- Fitting linking models: ################--------- Fitting linking models: #################-------- Fitting linking models: ##################------- Fitting linking models: ###################------ Fitting linking models: ####################----- Fitting linking models: #####################---- Fitting linking models: ######################--- Fitting linking models: #######################-- Fitting linking models: ########################- Fitting linking models: #########################fit$FABpv#> fv1 fv2 fv3 fv4 fv5 fv6 #> 1.300889e-01 8.510969e-01 2.726806e-02 3.492731e-03 4.061462e-01 1.948210e-01 #> fv7 fv8 fv9 fv10 fv11 fv12 #> 1.003337e-01 6.237990e-02 3.583927e-01 2.006993e-02 6.817413e-03 5.811456e-03 #> fv13 fv14 fv15 fv16 fv17 fv18 #> 2.904021e-03 9.425581e-02 1.341878e-01 2.477859e-02 5.061479e-02 8.149597e-03 #> fv19 fv20 fv21 fv22 fv23 fv24 #> 8.511975e-02 5.629506e-06 9.202411e-01 9.219267e-01 4.806814e-04 7.321544e-01 #> fv25 #> 2.441232e-02fit$FABci#> [,1] [,2] #> fv1 -0.344509499 1.8393237 #> fv2 -1.260577103 0.5006811 #> fv3 -2.042913896 -0.1585499 #> fv4 0.607599233 2.5067503 #> fv5 -0.962540473 1.2900883 #> fv6 -0.583689620 1.9673802 #> fv7 -0.221374101 1.7722294 #> fv8 -0.068943095 1.9953430 #> fv9 -0.812490173 1.2792500 #> fv10 0.271652644 2.4657495 #> fv11 0.340385794 2.1362770 #> fv12 0.396405482 2.3187286 #> fv13 0.774606791 3.0633649 #> fv14 -0.186042653 1.7507563 #> fv15 -1.967512806 0.3847793 #> fv16 0.211287525 2.3917946 #> fv17 -0.003559159 1.9305893 #> fv18 0.379208258 2.0351567 #> fv19 -0.186461981 2.0561664 #> fv20 1.536612983 4.0508068 #> fv21 -1.385328449 0.6096532 #> fv22 -1.816307227 0.5644109 #> fv23 0.565590160 2.9048210 #> fv24 -0.702040787 1.3685552 #> fv25 0.177403845 1.9724540#> #> Call: #> glm(formula = y ~ . + 0, family = ..1, data = as.data.frame(cbind(W, #> X))) #> #> Deviance Residuals: #> Min 1Q Median 3Q Max #> -1.97503 -0.75277 -0.00544 0.46538 2.57513 #> #> Coefficients: #> Estimate Std. Error z value Pr(>|z+bfab|) #> `(Intercept)` 0.87195 0.08187 10.651 < 2e-16 *** #> w1 -0.64159 0.60890 -1.054 0.292026 #> w2 -0.03471 0.58291 -0.060 0.952512 #> fv1 0.74741 0.66379 1.126 0.130089 #> fv2 -0.39186 0.52810 -0.742 0.851097 #> fv3 -1.10097 0.57266 -1.923 0.027268 * #> fv4 1.55717 0.57726 2.698 0.003493 ** #> fv5 0.16377 0.68470 0.239 0.406146 #> fv6 0.63989 0.74383 0.860 0.194821 #> fv7 0.77543 0.60597 1.280 0.100334 #> fv8 0.96320 0.62745 1.535 0.062380 . #> fv9 0.23338 0.63580 0.367 0.358393 #> fv10 1.36870 0.66691 2.052 0.020070 * #> fv11 1.28162 0.51956 2.467 0.006817 ** #> fv12 1.40368 0.55627 2.523 0.005811 ** #> fv13 1.91899 0.69568 2.758 0.002904 ** #> fv14 0.78236 0.58870 1.329 0.094256 . #> fv15 -0.79141 0.71502 -1.107 0.134188 #> fv16 1.30154 0.66278 1.964 0.024779 * #> fv17 0.96352 0.58790 1.639 0.050615 . #> fv18 1.20796 0.50287 2.402 0.008150 ** #> fv19 0.93485 0.68166 1.371 0.085120 . #> fv20 2.94693 0.67106 4.391 5.63e-06 *** #> fv21 -0.38784 0.60639 -0.640 0.920241 #> fv22 -0.84071 0.59312 -1.417 0.921927 #> fv23 1.93883 0.58724 3.302 0.000481 *** #> fv24 0.33326 0.62937 0.530 0.732154 #> fv25 1.07493 0.54562 1.970 0.024412 * #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> (Dispersion parameter for poisson family taken to be 1) #> #> Null deviance: 443.323 on 100 degrees of freedom #> Residual deviance: 81.014 on 72 degrees of freedom #> AIC: 385.28 #> #> Number of Fisher Scoring iterations: 5 #>