add na.action for handling NA’s for predict methods issue #10
include.always as new argument to
bas.lm. This allows a formula to specify which terms should always be included in all models. By default the intercept is always included.
added a section to the vignetted to illustrate weighted regression and the
force.heredity.bas function to group levels of a factor so that they enter or leave the model together.
fixed problem if there is only one model for
github issue #11
fixed error in
bas.lm with non-equal weights where R2 was incorrect. issue #17 ## Deprecated
predict argument in
predict.basglm and internal functions as it is not utilized
confint.coef.baswhen parm is a character string
Bayes.outlierif prior probability of no outliers is provided
fixed issue with scoping in eval of data in
predict.bas if dataname is defined in local env.
fixed issue 10 in github (predict for estimator=‘BPM’ failed if there were NA’s in the X data. Delete NA’s before finding the closest model.
fixed bug in ‘JZS’ prior - merged pull request #12 from vandenman/master
fixed bug in bas.glm when default betaprior (CCH) is used and inputs were INTEGER instead of REAL
removed warning with use of ‘ZS-null’ for backwards compatibility
updated print.bas to reflect changes in print.lm
Added Bayes.outlier function to calculate posterior probabilities of outliers using the method from Chaloner & Brant for linear models.
Added new method for
bas.lm to obtain marginal likelihoods with the Zellner-Siow Priors for “prior= ‘JZS’ using QUADMATH routines for numerical integration. The optional hyperparameter alpha may now be used to adjust the scaling of the ZS prior where g ~ G(1/2, alpha*n/2) as in the
BayesFactor package of Morey, with a default of alpha=1 corresponding to the ZS prior used in Liang et al (2008). This also uses more stable evaluations of log(1 + x) to prevent underflow/overflow.
ZS-full for bas.lm is planned to be deprecated.
replaced math functions to use portable C code from Rmath and consolidated header files
Fixed unprotected ANS in C code in glm_sampleworep.c and sampleworep.c after call to PutRNGstate and possible stack imbalance in glm_mcmc.
Fixed problem with predict for estimator=BPM when newdata was one row
Fixed non-conformable error with
predict when new data was from a dataframe with one row.
Fixed problem with missing weights for prediction using the median probability model with no new data.
Extract coefficent summaries, credible intervals and plots for the
MPM in addition to the default
BMA by adding a new
estimator argument to the
coef function. The new
n.models argument to
coef provides summaries based on the top
n.models highest probability models to reduce computation time. ‘n.models = 1’ is equivalent to the highest probability model.
use of newdata that is a vector is now depricated for predict.bas; newdata must be a dataframe or missing, in which case fitted values based on the dataframe used in fitting is used
factor levels are handled as in
glm for prediction when there may be only level of a factor in the newdata
fixed issue for prediction when newdata has just one row
fixed missing id in plot.bas for which=3
bas.lmto agree with documentation
renormalizethat selects whether the Monte Carlo frequencies are used to estimate posterior model and marginal inclusion probabilities (default
renormalize = FALSE) or that marginal likelihoods time prior probabilities that are renormalized to sum to 1 are used. (the latter is the only option for the other methods); new slots for probne0.MCMC, probne0.RN, postprobs.RN and postprobs.MCMC.
bas.glmto omit missing data.
confint.coef.bas. See the help files for an example or the vignette.
bas.glmto implement Bayes Fatcors based on the likelihood ratio statistic’s distribution for GLMs.
A vignette has been added at long last! This illustrates several of the new features in
BAS such as
typeto specify estimator in fitted.bas and replaced with
fitted()are compatible with other S3 methods.
basto avoid NAMESPACE conficts with other libraries
diagnostic()function for checking convergence of
basobjects created with
method = "MCMC""
plot.basthat appears with Sweave
coef.bmawhen there is just one predictor
bmato avoid name conflicts with other packages
- added weights for linear models - switched LINPACK calls in bayesreg to LAPACK finally should be faster - fixed bug in intercept calculation for glms - fixed inclusion probabilities to be a vector in the global EB methods for linear models
- added intrinsic prior for GLMs - fixed problems for linear models for p > n and R2 not correct
- added phi1 function from Gordy (1998) confluent hypergeometric function of two variables also known as one of the Horn hypergeometric functions or Humbert's phi1 - added Jeffrey's prior on g - added the general tCCH prior and special cases of the hyper-g/n. - TODO check shrinkage functions for all
- new improved Laplace approximation for hypergeometric1F1 - added class basglm for predict - predict function now handles glm output - added dataframe option for newdata in predict.bas and predict.basglm - renamed coefficients in output to be 'mle' in bas.lm to be consistent across lm and glm versions so that predict methods can handle both cases. (This may lead to errors in other external code that expects object$ols or object$coefficients) - fixed bug with initprobs that did not include an intercept for bas.lm
- added thinning option for MCMC method for bas.lm - returned posterior expected shrinkage for bas.glm - added option for initprobs = "marg-eplogp" for using marginal SLR models to create starting probabilities or order variables especially for p > n case - added standalone function for hypergeometric1F1 using Cephes library and a Laplace aproximation -Added class "BAS" so that predict and fitted functions (S3 methods) are not masked by functions in the BVS package: to do modify the rest of the S3 methods.
- added bas.glm for model averaging/section using mixture of g-priors for GLMs. Currently limited to Logistic Regression - added Poisson family for glm.fit
- cleaned up MCMC method code
- removed internal print statements in bayesglm.c - Bug fixes in AMCMC algorithm
- fixed glm-fit.R so that hyperparameter for BIC is numeric
- added new AMCMC algorithm
- bug fix in bayes.glm
- added C routines for fitting glms
- fixed problem with duplicate models if n.models was > 2^(p-1) by
- save original X as part of object so that fitted.bma gives the
correct fitted values (broken in version 0.80)
- Added `hypergeometric2F1` function that is callable by R - centered X's in bas.lm so that the intercept has the correct
shrinkage - changed
predict.bma to center newdata using the mean(X) - Added new Adaptive MCMC option (method = “AMCMC”) (this is not stable at this point)
-Allowed pruning of model tree to eliminate rejected models
- Added MCMC option to create starting values for BAS (`method = "MCMC+BAS"`)
-Cleaned up all .Call routines so that all objects are duplicated or
allocated within code
- fixed ch2inv that prevented building on Windows in bayes glm_fit
- fixed fortran calls to use F77_NAME macro - changed allocation of objects for .Call to prevent some objects from being overwritten.
- fixed EB.global function to include prior probabilities on models - fixed update function
- fixed predict.bma to allow newdata to be a matrix or vector with the
column of ones for the intercept optionally included. - fixed help file for predict - added modelprior argument to bas.lm so that users may now use the beta-binomial prior distribution on model size in addition to the default uniform distribution - added functions uniform(), beta-binomial() and Bernoulli() to create model prior objects - added a vector of user specified initial probabilities as an option for argument initprobs in bas.lm and removed the separate argument user.prob