Skip to content

Commit

Permalink
version 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Fletcher authored and cran-robot committed Jan 5, 2018
1 parent ba43852 commit daccdff
Show file tree
Hide file tree
Showing 21 changed files with 397 additions and 91 deletions.
10 changes: 6 additions & 4 deletions DESCRIPTION
@@ -1,14 +1,16 @@
Package: BayesGOF
Type: Package
Title: Bayesian Modeling via Goodness of Fit
Version: 1.3
Date: 2017-11-14
Version: 1.4
Date: 2018-01-02
Author: Subhadeep Mukhopadhyay, Douglas Fletcher
Maintainer: Doug Fletcher <tug25070@temple.edu>
Description: Non-parametric method for learning prior distribution starting with parametric (subjective) prior. It performs four interconnected tasks: (i) characterizes the uncertainty of the elicited prior; (ii) exploratory diagnostic for checking prior-data conflict; (iii) computes the final statistical prior density estimate; and (iv) performs macro- and micro-inference. Primary reference is Mukhopadhyay, S. and Fletcher, D. (2017, Technical Report).
Depends: orthopolynom, VGAM
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
License: GPL-2
NeedsCompilation: no
Packaged: 2017-11-16 02:29:46 UTC; Doug
Packaged: 2018-01-03 14:43:19 UTC; Doug
Repository: CRAN
Date/Publication: 2017-11-16 10:20:32 UTC
Date/Publication: 2018-01-05 19:00:44 UTC
35 changes: 20 additions & 15 deletions MD5
@@ -1,50 +1,55 @@
cfd4bef72baae3a4552280fa451fc676 *DESCRIPTION
ff715b03553ac6270dbb83c08e7f16df *DESCRIPTION
a4f3d575676f1b80e1058c92810fd2b7 *NAMESPACE
e8cdb771de69edc672a7aac8d9440bb9 *R/BetaBinoMLE.R
41c4e27fc84725947452cf8a4c781290 *R/DS.PostMean.R
b26eb9d329b41e2370371b06b92f2048 *R/DS.PostMean.reduce.R
fe43131dc70d9bfb435a4e0dcd3ae58d *R/ConMean.prt.2.R
f534a2cee775d2300a120951ff633f4a *R/DS.PostMean.R
6f77a33e7e6f0fa1184b966f73dae483 *R/DS.PostMean.reduce.R
df69695935b3e562e17b49c8223033a9 *R/DS.macro.inf.R
468477eb09a9719982eac417a2c94b62 *R/DS.micro.inf.R
f6bd71b34fe492a6b41c5767eb31772a *R/DS.mode.map.R
d7e1d4d09924ca058faacdad2455fa6d *R/DS.micro.inf.R
60be8417bea981f785e722ec25c278b9 *R/DS.mode.map.R
03be355b3798c6a69b97548e5eee3926 *R/DS.mode.reduce.R
176d6138242fd09744d1d85328a1a37f *R/DS.prior.R
8f5455dc47b5866c8c6423ee6b5f83ab *R/DS.prior.R
e5354a65b65d2c5b81582559ee7a1030 *R/EXP.denom.R
5ded1e76591fbd05471de371c5261042 *R/EXP.num.1.R
cd2cdbd50f105ec57eb2fd32efc9630d *R/EXP.num.2.R
074ac6883254aa2c0c110ef810250a9e *R/EXP.score.R
399a1ec91a0e02f8186b74648054c169 *R/EXP.score.R
e04999cc772d27e577942b140b77ef24 *R/LP.basis.beta.R
0488b1290b901beda5de0d54c6000679 *R/LP.smooth.R
6b2a90b2028ddec70ff0a68fa1a519e0 *R/Local.Mode.R
2809c3ee1ee7446e7a65b25a9705376a *R/PP.prt.2.R
cc0c13114ef93fab90e4634341fa76ce *R/Reduce.LP.coef.R
7fa03fde303c925b5de4e3fa82bfe8a4 *R/mom.est.R
a704236500da903d6e489b72cf9a7a59 *R/plot.DS_GF.R
4a066dcb7cf21ec5cae398acb93e70a2 *R/plot.DS_GF_macro_mean.R
72934ff6d9d54321965bd059222208d3 *R/plot.DS_GF_macro_mode.R
4958fab993b56a933daa39ab4f52c953 *R/plot.DS_GF_micro.R
71c42d22a062530811bf5774eab9b56f *R/plot.DS_GF.R
1f8be9e42445840b66f7f2457fa95f15 *R/plot.DS_GF_macro_mean.R
22ffc8f09ab875efedf86b9f35707f27 *R/plot.DS_GF_macro_mode.R
ca68dbc678d9f573c109a904b2ac29fb *R/plot.DS_GF_micro.R
32731dab82fe5d939ab07f068eece6e5 *R/print.DS_GF.R
847051f9d55ea4d3df293cbe661e8fb7 *R/print.DS_GF_macro_mean.R
5d2acbda0d40b6b8ea5074459f8916ba *R/print.DS_GF_macro_mode.R
9a2ea0cbaae526bf289d047e08c484c2 *R/print.DS_GF_micro.R
c5751d11df67d3e13765bb79a0ed8cdf *R/rDS.R
904d66c45aae0007a9a9790007834619 *R/rDS.posterior.R
43346db63edf02693e6dc6cde4561463 *R/weight.fun.beta.R
e8e8a76b16019e4560c612c15fd0e13d *build/partial.rdb
52e60785b26ceed34594689813d7cde2 *build/partial.rdb
32bb6c15cc261cc5a800feaef03df159 *build/vignette.rds
4eb418b2906c27f4d7c4f1820cdfef39 *data/rat.rda
86f2e44eba816a17d1c21b98238eb0f9 *data/ship.rda
2ea567712e420d7dad930065d164f0ea *data/surg.rda
b2cc985b167635ee9460b40031cb97b1 *data/tacks.rda
d5e17a0af9b0f694d178a824213f7f04 *data/terb.rda
b6b93be51774b48490af693f8da7b977 *inst/doc/vignette_BayesGOF.R
cbd58b4bd918f85fd591770a32884297 *inst/doc/vignette_BayesGOF.Rmd
e4d0976b6350f76127b0c4229a87fbc2 *inst/doc/vignette_BayesGOF.html
f602b20ce666636fd4ce1fe3e2e4b14f *man/BayesGOF-package.Rd
d5fe161c86340df185b1bf8722ed3244 *man/BetaBinoMLE.Rd
761067228b62ec63a273ba5dbe9034b2 *man/DS.PostMean.Rd
b14a54fa25faf8496826ef5e2a0938aa *man/DS.PostMean.Rd
f212f760e4377b14adde601a86a6c06b *man/DS.macro.inf.Rd
323c51a0c260a624791b4c2a5cd96081 *man/DS.micro.inf.Rd
cda9fcc073393201bc5ec9e9d1c94817 *man/DS.prior.Rd
883a6c582feafd1a0c212e75a234c579 *man/DS.prior.Rd
80f2637e9f992da56001c6e04a910c57 *man/LP.basis.beta.Rd
c5ae2041c3448673d570d4f62292a08a *man/rDS.Rd
d0e4b41b002567b8dd89ece7943ad973 *man/rat.Rd
036e74bea69c9cb18ce9435abda7a77d *man/ship.Rd
1a4578d3061e06f366a3a81187e2d7bb *man/surg.Rd
7df318a497e78c94fafa22de2db27802 *man/tacks.Rd
e260deea72882c143a52313389aa8b6d *man/terb.Rd
cbd58b4bd918f85fd591770a32884297 *vignettes/vignette_BayesGOF.Rmd
2 changes: 1 addition & 1 deletion R/PP.prt.2.R → R/ConMean.prt.2.R
@@ -1,4 +1,4 @@
PP.prt.2 <-
ConMean.prt.2 <-
function(c.vec, weight, leg.mat, u, par1, par2){
#### theta is G inv u = qnorm(u,muhat,tauhat)
inner.part <- qbeta(u, par1, par2)*leg.mat
Expand Down
22 changes: 5 additions & 17 deletions R/DS.PostMean.R
@@ -1,26 +1,14 @@
DS.PostMean <-
function(y.i, n.i, g.par, u, LP.par, method = c("LP-Score", "Theta")){
method = match.arg(method)
function(y.i, n.i, g.par, u, LP.par){
post.par1.i <- y.i + g.par[1]
post.par2.i <- n.i - y.i + g.par[2]
weight <- weight.fun.beta(u, g.par[1],g.par[2],post.par1.i,post.par2.i)
weight <- weight.fun.beta(u, g.par[1], g.par[2], post.par1.i, post.par2.i)
leg.mat <- LP.basis.beta(u,c(1,1), length(LP.par))
#leg.mat2 <- Leg.poly(u, length(LP.par))
switch(method,
"LP-Score" = {
vec.map <- (EXP.num.1(weight, leg.mat) +
EXP.num.2(LP.par, weight, leg.mat) ) /
EXP.denom(LP.par, weight, leg.mat)
return(vec.map)
},
"Theta" = {
if(sum(LP.par^2) == 0){
if(sum(LP.par^2) == 0){
ConMean.ind <- (post.par1.i)/(post.par1.i + post.par2.i)
} else {
post.mu <- post.par1.i /(post.par1.i + post.par2.i)
ConMean.ind <- ( post.mu + PP.prt.2(LP.par, weight, leg.mat, u, g.par[1], g.par[2]) ) / EXP.denom(LP.par,weight,leg.mat)
ConMean.ind <- ( post.mu + ConMean.prt.2(LP.par, weight, leg.mat, u, g.par[1], g.par[2]) ) / EXP.denom(LP.par,weight,leg.mat)
}
return(ConMean.ind)
}
)
return(ConMean.ind)
}
2 changes: 1 addition & 1 deletion R/DS.PostMean.reduce.R
Expand Up @@ -13,7 +13,7 @@ function(DS.GF.obj){
B <- dim(DS.GF.obj$prior.data)[1]
u <- seq(1/B,1-(1/B), length.out = B) ##unit interval, 0 to 1
ConMean.vec <- NULL
ConMean.vec <- apply(DS.GF.obj$obs.data, 1, function(x) DS.PostMean(x[1], x[2], DS.GF.obj$g.par, u, DS.GF.obj$LP.par, method = "Theta"))
ConMean.vec <- apply(DS.GF.obj$obs.data, 1, function(x) DS.PostMean(x[1], x[2], DS.GF.obj$g.par, u, DS.GF.obj$LP.par))
}
return(ConMean.vec)
}
33 changes: 15 additions & 18 deletions R/DS.micro.inf.R
Expand Up @@ -2,34 +2,31 @@ DS.micro.inf <-
function(DS.GF.obj, y.i, n.i){
#####################################################
# INPUTS
# y.0 number of successes in sample
# n.0 number of total trials in sample
# y.i number of successes in new study
# n.i number of total trials in new study
# DS.GF.obj AutoBayes-DataCorrect object
# OUTPUTS
out <- list()
alpha_0 <- DS.GF.obj$g.par[1]
beta_0 <- DS.GF.obj$g.par[2]
c.vec <- DS.GF.obj$LP.par
post.alph.i <- y.i + alpha_0
post.beta.i <- n.i - y.i + beta_0
##calculate denominator/standardization constant
#find posterior parameters
post.alph.i <- y.i + DS.GF.obj$g.par[1]
post.beta.i <- n.i - y.i + DS.GF.obj$g.par[2]
##determine parametric density
B=250
u.int <- seq(1/B, 1-(1/B), length.out = B)
leg.mat.den <- LP.basis.beta(u.int, c(1,1), length(c.vec))
wght.den <- weight.fun.beta(u.int,alpha_0,beta_0,
post.alph.i,post.beta.i)
##Get non-standard LP adjusted density
eb.pos.den <- dbeta(u.int, post.alph.i, post.beta.i)
#u.theta <- pbeta(u.int, alpha_0, beta_0)
Leg.G <- LP.basis.beta(u.int, c(alpha_0, beta_0), length(c.vec))
nstd.dc.pos <- eb.pos.den*(1+Leg.G%*%c.vec)
denom <- EXP.denom(c.vec, wght.den, leg.mat.den)
ds.pos <- nstd.dc.pos/denom
##determine LP density
#Leg(u) for weight function
leg.mat.den <- LP.basis.beta(u.int, c(1,1), length(DS.GF.obj$LP.par))
wght.den <- weight.fun.beta(u.int, DS.GF.obj$g.par[1], DS.GF.obj$g.par[2],
post.alph.i,post.beta.i)
Leg.G <- LP.basis.beta(u.int, c(DS.GF.obj$g.par[1], DS.GF.obj$g.par[2]), length(DS.GF.obj$LP.par))
ds.pos <- eb.pos.den*(1+Leg.G%*%DS.GF.obj$LP.par) / EXP.denom(DS.GF.obj$LP.par, wght.den, leg.mat.den)
#Format output
out$post.data <- data.frame(theta.vals = u.int,
parm.pos = eb.pos.den,
ds.pos = ds.pos)
out$post.data[out$post.data<0]<-0
out$post.mean <- DS.PostMean(y.i, n.i, DS.GF.obj$g.par, u.int, DS.GF.obj$LP.par, method = "Theta")
out$post.mean <- DS.PostMean(y.i, n.i, DS.GF.obj$g.par, u.int, DS.GF.obj$LP.par)
out$post.mode <- DS.mode.map(y.i, n.i, DS.GF.obj$g.par, DS.GF.obj$LP.par, B)
out$study <- c(y.i, n.i)
class(out) <- "DS_GF_micro"
Expand Down
3 changes: 1 addition & 2 deletions R/DS.mode.map.R
Expand Up @@ -12,8 +12,7 @@ function(y.i, n.i, g.par, LP.par, B){
post.par2.i <- n.i - y.i + g.par[2]
theta.rng <- seq(1/B,1-(1/B), length.out = B)
base.den <- dbeta(theta.rng, post.par1.i, post.par2.i)
u <- pbeta(theta.rng ,g.par[1], g.par[2])
Leg.G <- LP.basis.beta(u,c(1,1),length(LP.par))
Leg.G <- LP.basis.beta(theta.rng, g.par, length(LP.par))
adj <-1+ (Leg.G %*% (LP.par))
ds.den <- base.den * adj
ds.mode <- theta.rng[which.max(ds.den)]
Expand Down
8 changes: 5 additions & 3 deletions R/DS.prior.R
Expand Up @@ -3,8 +3,8 @@ function(yn.df, max.m = 8, start.par, iter.c = 200,
B = 1000, smooth.crit = "BIC"){
####iterates through given conditions to find c-vector
#### INPUTS
#### y.i predictions for X from each of k servers
#### n.i Bi-beta: number observations per y.i
#### yn.df dataframe with 1st column as predictions for X from each of k servers
#### and second column as number observations per y.i
#### start.par user-desired parameters for designated prior for beta-bin: c(alpha, beta)
#### max.m maximum order of legendre polynomials desired
#### iter.c number of iterations desired for calculating LP coefficents
Expand Down Expand Up @@ -40,9 +40,11 @@ function(yn.df, max.m = 8, start.par, iter.c = 200,
dev.m <- NULL
B.loop <- 150
u.loop <- seq(1/B.loop,1-(1/B.loop), length.out = B.loop) ##unit interval, 0 to 1
## Generate Posterior Values for Weight Function
post.alpha.i <- start.par[1] + yn.df[,1]
post.beta.i <- yn.df[,2] - yn.df[,1] + start.par[2]
post.mat <- data.frame(al = post.alpha.i, be = post.beta.i)
## Generate Weight Function Matrix for Conditional Expectation
wght.loop <- apply(post.mat, 1, function(x) weight.fun.beta(u.loop, start.par[1], start.par[2], x[1], x[2]))
###Determine LP coefficients
if(smooth.crit == "BIC"){
Expand Down Expand Up @@ -114,4 +116,4 @@ function(yn.df, max.m = 8, start.par, iter.c = 200,
class(out) <- "DS_GF"
return(out)
}
}
}
2 changes: 1 addition & 1 deletion R/EXP.score.R
Expand Up @@ -5,4 +5,4 @@ function(u, LP.par, weight.vec, leg.mat){
EXP.num.2(LP.par, weight.vec, leg.mat) ) /
EXP.denom(LP.par, weight.vec, leg.mat)
return(vec.map)
}
}
20 changes: 9 additions & 11 deletions R/plot.DS_GF.R
@@ -1,15 +1,16 @@
plot.DS_GF <-
function(x, plot.type = c("Ufunc","mDev","DS_G"), ...) {
function(x, plot.type = c("Ufunc","mDev","DSg"), ...) {
method = match.arg(plot.type)
switch(method,
"Ufunc" = {
plot(x$UF.dat$UF.x, x$UF.dat$UF.y,
xlim = c(0,1),ylim = c(0,2.5),
xlim = c(0,1),
#ylim = c(0,2.5),
main = "",
type = "l",
lwd = 2,
xlab = "", ylab = "", font.main = 1,
cex.lab=1.25, cex.axis=1.25, cex.main=1.25, cex.sub=1.25)
cex.lab=1.25, cex.axis=1.25, cex.main=1.25, cex.sub=1.25,...)
abline(h = 1, col = "red", lwd = 2, cex = 3, lty = "dashed")
title(ylab = expression(paste(hat(d))), line = 2.3, cex.lab=1.25)
},
Expand All @@ -19,24 +20,23 @@ function(x, plot.type = c("Ufunc","mDev","DS_G"), ...) {
main = "",
type = "l", lwd = 2, col = "darkorchid",
xlab = "m", ylab = "Deviance: AIC", font.main = 1,
cex.lab=1.5, cex.axis=2, cex.main=2, cex.sub=1.5)
cex.lab=1.5, cex.axis=2, cex.main=2, cex.sub=1.5,...)
} else {
plot(x$dev.df$m, x$dev.df$dev,
main = "",
type = "l", lwd = 2, col = "darkorchid",
xlab = "m", ylab = "Deviance: BIC", font.main = 1,
cex.lab=1.5, cex.axis=2, cex.main=2, cex.sub=1.5)
cex.lab=1.5, cex.axis=2, cex.main=2, cex.sub=1.5,...)
}
},
"DS_G" = {
"DSg" = {
if(sum(x$LP.par^2)==0){
plot(x$prior.data$theta.vals, x$prior.data$parm.prior,
xlim = c(0,1),
main = "",
type = "l", lwd = 2, col = "blue", lty = "dashed",
xlab = "", #expression(theta)
ylab = "", font.main = 1,
cex.lab=1.25, cex.axis=1.5, cex.main=1.5, cex.sub=1.5)
cex.lab=1.25, cex.axis=1.5, cex.main=1.5, cex.sub=1.5, ...)
title(ylab = expression(paste(hat(pi)(theta))), line = 2.3, cex.lab=1.25)
legend("bottom", legend = "g",
xpd = TRUE, horiz = TRUE, inset = c(0, -.18),
Expand All @@ -45,12 +45,10 @@ function(x, plot.type = c("Ufunc","mDev","DS_G"), ...) {
} else {
x.name <- deparse(substitute(x))
plot(x$prior.data$theta.vals, x$prior.data$ds.prior,
xlim = c(0,1),
main = "",
#main = bquote(.(x.name)~"Prior Densities: G and"~Pi),
type = "l", lwd = 2, col = "red3",
xlab = "", ylab = "", font.main = 1,
cex.lab=1.25, cex.axis=1.25, cex.main=1.25, cex.sub=1.25)
cex.lab=1.25, cex.axis=1.25, cex.main=1.25, cex.sub=1.25,...)
title(ylab = expression(paste(hat(pi)(theta))), line = 2.3, cex.lab=1.25)
lines(x$prior.data$theta.vals, x$prior.data$parm.prior,
col = "blue", lwd = 2, cex = 3, lty = "dashed")
Expand Down
4 changes: 2 additions & 2 deletions R/plot.DS_GF_macro_mean.R
Expand Up @@ -2,11 +2,11 @@ plot.DS_GF_macro_mean <-
function(x, ...){
par(mar=c(5,5,4,2)+0.3) #changes left margin to make large labels fit
plot(x$prior.data$theta.vals, x$prior.data$parm.prior,
xlim = c(0,1),
#xlim = c(0,1),
main = "MacroInference: Mean",
type = "l", yaxs = "i", lwd = 2, col = "red3",
xlab = expression(theta), ylab = "", font.main = 1,
cex.lab=1.45, cex.axis=1.5, cex.main=2, cex.sub=1.5)
cex.lab=1.45, cex.axis=1.5, cex.main=2, cex.sub=1.5, ...)
title(ylab = expression(paste(hat(pi)(theta))), line = 2.3, cex.lab=1.45)
points(x$model.mean, 0, col = "green", pch = 17, cex = 1.5)
axis(1, at=seq(x$model.mean - x$mean.sd,
Expand Down
10 changes: 5 additions & 5 deletions R/plot.DS_GF_macro_mode.R
Expand Up @@ -7,10 +7,10 @@ function(x, ...){
}
if(dim(x$prior.data)[2] == 3){
par(mar=c(5,5,4,2)+0.3) #changes left margin to make large labels fit
plot(x$prior.data$theta.vals, x$prior.data$ds.prior, xlim = c(0,1),
plot(x$prior.data$theta.vals, x$prior.data$ds.prior,
main = "MacroInference: Modes", type = "l", yaxs = "i", lwd = 2, col = "red3",
xlab = expression(theta), ylab = "", font.main = 1,
cex.lab=1.45, cex.axis=1.5, cex.main=2, cex.sub=1.5)
cex.lab=1.45, cex.axis=1.5, cex.main=2, cex.sub=1.5, ...)
title(ylab = expression(paste(hat(pi)(theta))), line = 2.3, cex.lab=1.45)
points(x$model.modes, rep(0, length(x$model.modes)), col = "green", pch = 17, cex = 1.5)
for(i in 1:length(x$model.modes)){
Expand All @@ -19,15 +19,15 @@ function(x, ...){
}
} else {
par(mar=c(5,5,4,2)+0.3) #changes left margin to make large labels fit
plot(x$prior.data$theta.vals, x$prior.data$parm.prior, xlim = c(0,1),
plot(x$prior.data$theta.vals, x$prior.data$parm.prior,
main = "MacroInference: Modes", type = "l", yaxs = "i", lwd = 2, col = "red3",
xlab = expression(theta), ylab = "", font.main = 1,
cex.lab=1.45, cex.axis=1.5, cex.main=2, cex.sub=1.5)
cex.lab=1.45, cex.axis=1.5, cex.main=2, cex.sub=1.5, ...)
title(ylab = expression(paste(hat(pi)(theta))), line = 2.3, cex.lab=1.45)
points(x$model.modes, rep(0, length(x$model.modes)), col = "green", pch = 17, cex = 1.5)
for(i in 1:length(x$model.modes)){
axis(1, at=seq(mode.mat[i,1],mode.mat[i,2],length=20),tick=TRUE,
col="goldenrod4",labels = F,tck=-0.015)
}
}
}
}
7 changes: 3 additions & 4 deletions R/plot.DS_GF_micro.R
@@ -1,11 +1,10 @@
plot.DS_GF_micro <-
function(x, x.lim = c(0,1), ...){
plot(x$post.data$theta.vals, x$post.data$ds.pos, xlim = x.lim,
function(x, ...){
plot(x$post.data$theta.vals, x$post.data$ds.pos,
main = "Posterior Density Estimate", type = "l", lwd = 2, col = "red3",
xlab = expression(theta), ylab = "", font.main = 1,
cex.lab=1.45, cex.axis=1.5, cex.main=1.5, cex.sub=1.5)
cex.lab=1.45, cex.axis=1.5, cex.main=1.5, cex.sub=1.5, ...)
title(ylab = expression(paste(hat(pi)(theta[i]~"|"~y[i]))), line = 2.3, cex.lab=1.45)
lines(x$post.data$theta.vals, x$post.data$parm.pos,
col = "blue", lty = "dashed", lwd = 2)
}

Binary file modified build/partial.rdb
Binary file not shown.
Binary file added build/vignette.rds
Binary file not shown.
36 changes: 36 additions & 0 deletions inst/doc/vignette_BayesGOF.R
@@ -0,0 +1,36 @@
## ---- message = FALSE---------------------------------------------------
library(BayesGOF)
set.seed(8697)
data(rat)
###Use MLE to determine starting values
rat.start <- BetaBinoMLE(rat$y, rat$n)$estimate

## ------------------------------------------------------------------------
rat.ds <- DS.prior(rat, max.m = 6, rat.start)

## ---- fig.height = 5.5, fig.width = 5.5, fig.align = 'center'------------
plot(rat.ds, plot.type = "Ufunc")

## ------------------------------------------------------------------------
rat.ds

## ----fig.height = 5.5, fig.width = 5.5,fig.align = 'center'--------------
plot(rat.ds, plot.type = "DSg")

## ---- warning = FALSE----------------------------------------------------
rat.macro.md <- DS.macro.inf(rat.ds, num.modes = 2 , iters = 25, method = "mode")

## ------------------------------------------------------------------------
rat.macro.md

## ---- fig.height = 5.5, fig.width = 5.5,fig.align = 'center'-------------

plot(rat.macro.md)

## ---- fig.align = 'center'-----------------------------------------------
rat.y71.micro <- DS.micro.inf(rat.ds, y.i = 4, n.i = 14)
rat.y71.micro

## ----fig.height = 5.5, fig.width = 5.5,fig.align = 'center'--------------
plot(rat.y71.micro)

0 comments on commit daccdff

Please sign in to comment.