Extract the fixed effects of model. Coefficients correspond to columns of space spanned by the
columns of design matrix for fixed effects
Usage
## S3 method for class 'Bayesthresh'
coef(object, HPDinterval=FALSE, prob=0.95,...)
Arguments
object
is an object of class "Bayesthresh"
HPDinterval
If HPDinterval=TRUE, return the credibility interval for fixed effects model.
By default is FALSE. See package coda
prob
A numeric scalar in the interval (0,1) giving the target probability content of the intervals.
The nominal probability content of the intervals is the multiple of 1/nrow(obj) nearest to prob
...
no usage
Examples
# Not run
data(sensory)
Consumer <- factor(sensory$consumer)
Sacarose <- factor(sensory$sacarose)
#### Model
# Not run
dex1 <- Bayesthresh(cor ~ (1|Consumer) + Sacarose, burn = 0,
jump = 1, ef.iter = 10, data=sensory, Write=TRUE)
coef(dex1)
coef(dex1, HPDinterval=TRUE)
# Not run
dex2 <- Bayesthresh(cor ~ (1|Consumer) + Sacarose, burn = 0,
jump = 1, ef.iter = 10, data=sensory)
coef(dex2)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Bayesthresh)
Loading required package: lme4
Loading required package: Matrix
Loading required package: MASS
Loading required package: VGAM
Loading required package: stats4
Loading required package: splines
Loading required package: mvtnorm
Loading required package: matrixcalc
Loading required package: coda
Attaching package: 'coda'
The following object is masked from 'package:VGAM':
nvar
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Bayesthresh/coef.Bayesthresh.Rd_%03d_medium.png", width=480, height=480)
> ### Name: coef.Bayesthresh
> ### Title: Coefficients for the fixed effects model
> ### Aliases: coef.Bayesthresh
>
> ### ** Examples
>
>
> # Not run
> data(sensory)
>
> Consumer <- factor(sensory$consumer)
> Sacarose <- factor(sensory$sacarose)
>
> #### Model
> # Not run
> dex1 <- Bayesthresh(cor ~ (1|Consumer) + Sacarose, burn = 0,
+ jump = 1, ef.iter = 10, data=sensory, Write=TRUE)
>
> coef(dex1)
Estimate Std. Dev
(Intercept) 1.08730847 0.2326235
Sacarose40 -0.12008825 0.1682040
Sacarose50 -0.08693846 0.1042056
> coef(dex1, HPDinterval=TRUE)
$Coefficients
Estimate Std. Dev
(Intercept) 1.08730847 0.2326235
Sacarose40 -0.12008825 0.1682040
Sacarose50 -0.08693846 0.1042056
$HPD.interval
lower upper
(Intercept) 0.7497014 1.6886419
Sacarose40 -0.3757820 0.1857707
Sacarose50 -0.2296831 0.1363157
attr(,"Probability")
[1] 0.9
>
> # Not run
> dex2 <- Bayesthresh(cor ~ (1|Consumer) + Sacarose, burn = 0,
+ jump = 1, ef.iter = 10, data=sensory)
> coef(dex2)
Estimate Std. Dev
(Intercept) 1.1295917 0.1579577
Sacarose40 -0.2504461 0.2753449
Sacarose50 -0.2400665 0.2293757
>
>
>
>
>
>
>
> dev.off()
null device
1
>