rbind.estimate: Combine 'estimate' objects by rows.

Description Usage Arguments Author(s) Examples

View source: R/rbind.estimate.R

Description

rbind method for estimate class from decisionSupport package.

Usage

1
2
## S3 method for class 'estimate'
rbind(...)

Arguments

...

estimate object to combine

Author(s)

Issoufou Liman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## This example is taken fom decisionSupport
library (decisionSupport)

# Create an estimate with optional columns (only marginal information supplied):
estimateMarg<-estimate(           c("posnorm", "lnorm"),
c(        4,       4),
c(       50,      10),
variable=c("revenue", "costs"),
median = c(   "mean",      NA),
method = c(    "fit",      ""))
print(estimateMarg)
print(corMat(estimateMarg))

# Create an estimate from text (with correlated components):
estimateTextMarg<-"variable,  distribution, lower, upper
revenue1,  posnorm,      100,   1000
revenue2,  posnorm,      50,    2000
costs1,    posnorm,      50,    2000
costs2,    posnorm,      100,   1000"
estimateTextCor<-",         revenue1, costs2
revenue1,        1,   -0.3
costs2,       -0.3,      1"
estimateCor <- as.estimate (read.csv (header=TRUE, text=estimateTextMarg,
strip.white = TRUE, stringsAsFactors = FALSE),
correlation_matrix = data.matrix (read.csv (text = estimateTextCor,
row.names = 1, strip.white = TRUE)))

estimateMarg; estimateCor
rbind (estimateMarg, estimateCor)

Issoufou-Liman/decisionSupportExtra documentation built on Dec. 21, 2020, 6:28 p.m.