Last data update: 2014.03.03

R: Extract the predict values
predict.BayesthreshR Documentation

Extract the predict values

Description

Predict values based on the Bayesthres model object

Usage

## S3 method for class 'Bayesthresh'
predict(object, ...)

Arguments

object

Object of class "Bayesthresh"

...

No usage

Examples


# Not run
data(sensory)

Consumer <- factor(sensory$consumer)
Sacarose <- factor(sensory$sacarose)

#### Model 
# Not run
dex1 <- Bayesthresh(flavor ~ (1|Consumer) + Sacarose, burn = 0, 
																			jump = 1, ef.iter = 10, data=sensory) 

predict(dex1)

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/predict.Bayesthresh.Rd_%03d_medium.png", width=480, height=480)
> ### Name: predict.Bayesthresh
> ### Title: Extract the predict values
> ### Aliases: predict.Bayesthresh
> ### Keywords: models methods
> 
> ### ** Examples
> 
> 
> # Not run
> data(sensory)
> 
> Consumer <- factor(sensory$consumer)
> Sacarose <- factor(sensory$sacarose)
> 
> #### Model 
> # Not run
> dex1 <- Bayesthresh(flavor ~ (1|Consumer) + Sacarose, burn = 0, 
+ 																			jump = 1, ef.iter = 10, data=sensory) 
> 
> predict(dex1)
           [,1]
  [1,] 4.729848
  [2,] 4.028168
  [3,] 4.544084
  [4,] 3.474778
  [5,] 4.457660
  [6,] 4.874583
  [7,] 4.985432
  [8,] 5.327135
  [9,] 4.555254
 [10,] 4.223524
 [11,] 4.799831
 [12,] 4.397747
 [13,] 4.299272
 [14,] 3.833527
 [15,] 4.567973
 [16,] 4.653705
 [17,] 4.685503
 [18,] 5.053682
 [19,] 4.157336
 [20,] 3.909319
 [21,] 3.898945
 [22,] 4.197994
 [23,] 4.363871
 [24,] 5.012189
 [25,] 5.119770
 [26,] 4.281761
 [27,] 4.525634
 [28,] 4.603001
 [29,] 4.323348
 [30,] 3.389880
 [31,] 4.734496
 [32,] 4.005395
 [33,] 5.117501
 [34,] 5.455613
 [35,] 5.339828
 [36,] 4.744492
 [37,] 4.383675
 [38,] 3.606398
 [39,] 4.172899
 [40,] 3.025867
 [41,] 4.076135
 [42,] 4.550718
 [43,] 4.680470
 [44,] 5.091933
 [45,] 4.185464
 [46,] 3.817843
 [47,] 4.464121
 [48,] 4.009514
 [49,] 3.900807
 [50,] 3.399194
 [51,] 4.199787
 [52,] 4.296805
 [53,] 4.333001
 [54,] 4.761200
 [55,] 3.745802
 [56,] 3.479477
 [57,] 3.468458
 [58,] 3.790005
 [59,] 3.972008
 [60,] 4.712041
 [61,] 4.840023
 [62,] 3.881578
 [63,] 4.152174
 [64,] 4.239327
 [65,] 3.927295
 [66,] 2.939088
 [67,] 4.388999
 [68,] 3.581980
 [69,] 4.837306
 [70,] 5.252039
 [71,] 5.107602
 [72,] 4.400459
 [73,] 4.317743
 [74,] 3.529050
 [75,] 4.102960
 [76,] 2.945708
 [77,] 4.004590
 [78,] 4.488480
 [79,] 4.621434
 [80,] 5.045189
 [81,] 4.115744
 [82,] 3.742707
 [83,] 4.399909
 [84,] 3.936947
 [85,] 3.826716
 [86,] 3.320299
 [87,] 4.130320
 [88,] 4.229135
 [89,] 4.266041
 [90,] 4.704311
 [91,] 3.669840
 [92,] 3.401109
 [93,] 3.390013
 [94,] 3.714541
 [95,] 3.898896
 [96,] 4.653831
 [97,] 4.785349
 [98,] 3.807235
 [99,] 4.081879
[100,] 4.170575
[101,] 3.853559
[102,] 2.858913
[103,] 4.323178
[104,] 3.504418
[105,] 4.782554
[106,] 5.211082
[107,] 5.061397
[108,] 4.334877
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>