estimate.bigm: Obtaining Bayesian estimators of interest from a GLM model

Usage Arguments Value See Also Examples

View source: R/the_mode_jumping_package5.r View source: R/the_mode_jumping_package4.r View source: R/the_mode_jumping_package4.0.r View source: R/the_mode_jumping_package3.r View source: R/the_mode_jumping_package2.r View source: R/the_mode_jumping_package2.0.r

Usage

1
estimate.bigm(formula, data, family, prior, maxit = 2,chunksize = 1000000)

Arguments

formula

a formula object for the model to be addressed

data

a data frame object containing variables and observations corresponding to the formula used

family

distribution family foe the responces

prior

either "AIC" or "BIC"

maxit

maximum number of Fisher scoring iterations

chunksize

size of chunks for processng the data frame

Value

a list of

mlik

marginal likelihood of the model

waic

AIC model selection criterion

dic

BIC model selection criterion

summary.fixed$mean

a vector of posterior modes of the parameters

n

sample size

See Also

biglm::bigglm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(RCurl)


X4= as.data.frame(array(data = rbinom(n = 50*1000,size = 1,prob = runif(n = 50*1000,0,1)),dim = c(1000,50)))
Y4=rnorm(n = 1000,mean = 1+7*(X4$V4*X4$V17*X4$V30*X4$V10)+7*(((X4$V50*X4$V19*X4$V13*X4$V11)>0)) + 9*(X4$V37*X4$V20*X4$V12)+ 7*(X4$V1*X4$V27*X4$V3)
             +3.5*(X4$V9*X4$V2) + 6.6*(X4$V21*X4$V18) + 1.5*X4$V7 + 1.5*X4$V8,sd = 1)
X4$Y4=Y4
data.example = as.data.frame(X4)
formula1 = as.formula(paste(colnames(X4)[51],"~ 1 +",paste0(colnames(X4)[-c(51)],collapse = "+")))

formula1 = as.formula(paste(colnames(data.example)[1],"~ 1 +",paste0(colnames(data.example)[-1],collapse = "+")))
estimate.bigm(formula = formula1, data = data.example,n=47,prior = "BIC", maxit = 20,chunksize = 1000000, family = gaussian())

aliaksah/EMJMCMC2016 documentation built on July 19, 2019, 12:01 p.m.