R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 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 a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("moc-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('moc') Package: moc Version: 1.0.0 Date: 2005-01-02 Title: GENERAL NONLINEAR MIXTURES OF CURVES Author: Bernard Boulerice Maintainer: Bernard Boulerice Depends: Description: Fits a variety of mixtures models for multivariate observations with user-defined distributions and profiles. License: GPL (version 2 or later, see the included file GPL) Packaged: Wed Feb 9 12:44:50 2005; root Built: R 2.1.1; powerpc-apple-darwin7.9.0; 2005-07-13 17:25:24; unix Supplementary utility functions to help combine MOC models can be found in /CRANPkg/check/moc.Rcheck/moc/Utils/combine.moc.R See the file for simple documentation. You must source that file to use those functions. > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "moc" > > ### * moc > > flush(stderr()); flush(stdout()) > > ### Name: moc > ### Title: Fit a General Nonlinear Multivariate Mixture Model (MOC) > ### Aliases: moc update.moc > ### Keywords: models nonlinear cluster classif multivariate > > ### ** Examples > > > data(moc.dat) > > cnorm.dat<-list() #This is used as a container for functions and data > > # Censored Normal (marginal density) > > cnorm.dat$cnorm<-function(x,mu,sig,min,max) + {mi<-(x == min)*1 + ma<-(x == max)*1 + mi*pnorm((min-mu)/sig)+ma*(1-pnorm((max-mu)/sig))+ + (1-mi-ma)*dnorm((x-mu)/sig)/sig} > > # For this data set the range of the dependent variables is [0,14] > > cnorm.dat$cnorm1<-function(x,mu,sig,...) {cnorm(x,mu,sig,0,14)} > > # We have 4 observations > > cnorm.dat$gmu1<- list( + Group1 = function(pmu) {t(1)%*%rep(pmu[1],4)}, + Group2 = function(pmu) {t(1)%*%rep(pmu[2],4)}, + Group3 = function(pmu) {t(1)%*%rep(pmu[3],4)}) > > attr(cnorm.dat$gmu1,"parameters")<-c(" cons1"," cons2"," cons3") > > # Expected value of a general censored normal > > cnorm.dat$cmean<-function(mu,sig,min,max) { + max-(max-mu)*pnorm((max-mu)/sig)+(min-mu)*pnorm((min-mu)/sig)- + sig*(dnorm((max-mu)/sig)-dnorm((min-mu)/sig)) } > > # Homogeneous variances > > cnorm.dat$gshape1<- list( + Group1 = function(psh) {t(1)%*%rep(exp(psh[1]),4)}, + Group2 = function(psh) {t(1)%*%rep(exp(psh[1]),4)}, + Group3 = function(psh) {t(1)%*%rep(exp(psh[1]),4)}) > > attr(cnorm.dat$gshape1,"parameters")<-c(" log(std.dev)") > > cnorm.dat$cmean1<- list( + Group1 = function(p) {cmean(gmu1[[1]](p[1:3]),gshape1[[1]](p[4]),0,14) }, + Group2 = function(p) {cmean(gmu1[[2]](p[1:3]),gshape1[[2]](p[4]),0,14) }, + Group3 = function(p) {cmean(gmu1[[3]](p[1:3]),gshape1[[3]](p[4]),0,14) }) > > moc1<- + moc(moc.dat[,1:4],density=cnorm1,groups=3,gmu=gmu1,gshape=gshape1, + expected=cmean1,pgmu=c(0.5, 2, 5),pgshape=c(0.7),pgmix=c(-0.6, -2.0), + data=cnorm.dat,gradtol=1E-4) iteration = 0 Step: [1] 0 0 0 0 0 0 Parameter: [1] 0.5 2.0 5.0 0.7 -0.6 -2.0 Function Value [1] 3363.346 Gradient: [1] 204.4461623 -0.7257715 3.0650582 -66.0733628 45.9645606 2.9248233 iteration = 16 Parameter: [1] -0.6273950 1.9132002 4.7557076 0.7183199 -0.6941413 -1.9862151 Function Value [1] 3253.824 Gradient: [1] 0.23268012 -0.00957629 -0.06241921 -0.17464213 -0.01005756 0.02275034 Relative gradient close to zero. Current iterate is probably solution. Estimation took 3.32 seconds. > > print(moc1) 3 mixtures MOC model Response: as.matrix(moc.dat[, 1:4]) Density: cnorm1 function (x, mu, sig, ...) { cnorm(x, mu, sig, 0, 14) } Location: gmu1 Group1 : function (pmu) { matrix({ t(1) %*% rep(pmu[1], 4) }, 500, 4, byrow = TRUE) } Group2 : function (pmu) { matrix({ t(1) %*% rep(pmu[2], 4) }, 500, 4, byrow = TRUE) } Group3 : function (pmu) { matrix({ t(1) %*% rep(pmu[3], 4) }, 500, 4, byrow = TRUE) } Expectation: cmean1 Group1 : function (p) { matrix({ cmean(gmu1[[1]](p[1:3]), gshape1[[1]](p[4]), 0, 14) }, 500, 4, byrow = TRUE) } Group2 : function (p) { matrix({ cmean(gmu1[[2]](p[1:3]), gshape1[[2]](p[4]), 0, 14) }, 500, 4, byrow = TRUE) } Group3 : function (p) { matrix({ cmean(gmu1[[3]](p[1:3]), gshape1[[3]](p[4]), 0, 14) }, 500, 4, byrow = TRUE) } Shape: gshape1 Group1 : function (psh) { matrix({ t(1) %*% rep(exp(psh[1]), 4) }, 500, 4, byrow = TRUE) } Group2 : function (psh) { matrix({ t(1) %*% rep(exp(psh[1]), 4) }, 500, 4, byrow = TRUE) } Group3 : function (psh) { matrix({ t(1) %*% rep(exp(psh[1]), 4) }, 500, 4, byrow = TRUE) } Mixture: inv.glogit function (gmix) { matrix({ rbind(c(1, exp(gmix)))/(1 + sum(exp(gmix))) }, 500, 3, byrow = TRUE) } attr(,"parameters") [1] " G2 vs G1" " G3 vs G1" Maximum Likelihood Estimates Standard Wald Chi-Sq: Parameter Estimate Error Param = 0 Prob > Wald Location: cons1 -0.6274 0.11252 31.092 2.4604e-08 cons2 1.9132 0.19884 92.576 0.0000e+00 cons3 4.7557 0.25112 358.635 0.0000e+00 Shape: log(std.dev) 0.71832 0.024830 836.89 0 Mixture: G2 vs G1 -0.69414 0.17323 16.057 6.1458e-05 G3 vs G1 -1.98622 0.25175 62.247 2.9976e-15 Mean Mixture Probabilities: Group1 Group2 Group3 0.610979 0.305186 0.083835 -2*logLikelihood AIC BIC Entropy ICL-BIC Df 6507.649 6519.649 6553.254 148.3154 6849.885 1994 Mean Posterior Mixture Probabilities: Group1 Group2 Group3 0.61100 0.30521 0.08379 Posterior mean predicted values: Y1 Y2 Y3 Y4 Group1 0.54251 0.54251 0.54251 0.54251 Group2 2.10708 2.10708 2.10708 2.10708 Group3 4.76281 4.76281 4.76281 4.76281 Posterior mean observed values: Y1 Y2 Y3 Y4 Group1 0.60995 0.53472 0.54962 0.48174 Group2 3.30250 2.26295 1.58538 1.28993 Group3 5.05277 4.80504 4.49113 4.70175 > > ## Not run: > ##D # Heterogeneous variances across mixture groups > ##D > ##D cnorm.dat$gshape2<-list( > ##D Group1 = function(psh) {t(1)%*%rep(exp(psh[1]),4)}, > ##D Group2 = function(psh) {t(1)%*%rep(exp(psh[2]),4)}, > ##D Group3 = function(psh) {t(1)%*%rep(exp(psh[3]),4)}) > ##D > ##D cnorm.dat$cmean2<-list( > ##D Group1 = function(p) {cmean(gmu1[[1]](p[1:3]),gshape2[[1]](p[4:6]),0,14) }, > ##D Group2 = function(p) {cmean(gmu1[[2]](p[1:3]),gshape2[[2]](p[4:6]),0,14) }, > ##D Group3 = function(p) {cmean(gmu1[[3]](p[1:3]),gshape2[[3]](p[4:6]),0,14) }) > ##D > ##D moc2<- > ##D moc(moc.dat[,1:4],density=cnorm1,groups=3,gmu=gmu1,gshape=gshape2, > ##D expected=cmean2,pgmu=moc1$coef[1:3],pgshape=c(rep(moc1$coef[4],3)), > ##D pgmix=moc1$coef[5:6],data=cnorm.dat,gradtol=1E-4) > ## End(Not run) > # Heterogeneous variances across time > > cnorm.dat$gshape3<-list( + Group1 = function(psh) {exp(t(1)%*%psh[1:4])}, + Group2 = function(psh) {exp(t(1)%*%psh[1:4])}, + Group3 = function(psh) {exp(t(1)%*%psh[1:4])}) > > cnorm.dat$cmean3<-list( + Group1 = function(p) {cmean(gmu1[[1]](p[1:3]),gshape3[[1]](p[4:7]),0,14)}, + Group2 = function(p) {cmean(gmu1[[2]](p[1:3]),gshape3[[2]](p[4:7]),0,14)}, + Group3 = function(p) {cmean(gmu1[[3]](p[1:3]),gshape3[[3]](p[4:7]),0,14)}) > > moc3<- + moc(moc.dat[,1:4],density=cnorm1,groups=3,gmu=gmu1,gshape=gshape3, + expected=cmean3,pgmu=moc1$coef[1:3],pgshape=c(rep(moc1$coef[4],4)), + pgmix=moc1$coef[5:6],data=cnorm.dat,gradtol=1E-4) iteration = 0 Step: [1] 0 0 0 0 0 0 0 0 0 Parameter: [1] -0.6273950 1.9132002 4.7557076 0.7183199 0.7183199 0.7183199 0.7183199 [8] -0.6941413 -1.9862151 Function Value [1] 3253.824 Gradient: [1] 0.23268012 -0.00957629 -0.06241921 -126.91892957 38.08520983 [6] 62.70518538 25.95297228 -0.01005756 0.02275034 Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value iteration = 19 Parameter: [1] -0.4884127 1.4897449 4.8303218 1.0275546 0.7192893 0.4947604 0.5174219 [8] -0.6667800 -1.9583833 Function Value [1] 3222.457 Gradient: [1] 0.17931061 -0.08158569 -0.05637263 0.02757521 -0.08258530 0.07390595 [7] 0.17950119 0.01387111 -0.04600711 Relative gradient close to zero. Current iterate is probably solution. Estimation took 5.5 seconds. > > print(moc3) 3 mixtures MOC model Response: as.matrix(moc.dat[, 1:4]) Density: cnorm1 function (x, mu, sig, ...) { cnorm(x, mu, sig, 0, 14) } Location: gmu1 Group1 : function (pmu) { matrix({ t(1) %*% rep(pmu[1], 4) }, 500, 4, byrow = TRUE) } Group2 : function (pmu) { matrix({ t(1) %*% rep(pmu[2], 4) }, 500, 4, byrow = TRUE) } Group3 : function (pmu) { matrix({ t(1) %*% rep(pmu[3], 4) }, 500, 4, byrow = TRUE) } Expectation: cmean3 Group1 : function (p) { matrix({ cmean(gmu1[[1]](p[1:3]), gshape3[[1]](p[4:7]), 0, 14) }, 500, 4, byrow = TRUE) } Group2 : function (p) { matrix({ cmean(gmu1[[2]](p[1:3]), gshape3[[2]](p[4:7]), 0, 14) }, 500, 4, byrow = TRUE) } Group3 : function (p) { matrix({ cmean(gmu1[[3]](p[1:3]), gshape3[[3]](p[4:7]), 0, 14) }, 500, 4, byrow = TRUE) } Shape: gshape3 Group1 : function (psh) { matrix({ exp(t(1) %*% psh[1:4]) }, 500, 4, byrow = TRUE) } Group2 : function (psh) { matrix({ exp(t(1) %*% psh[1:4]) }, 500, 4, byrow = TRUE) } Group3 : function (psh) { matrix({ exp(t(1) %*% psh[1:4]) }, 500, 4, byrow = TRUE) } Mixture: inv.glogit function (gmix) { matrix({ rbind(c(1, exp(gmix)))/(1 + sum(exp(gmix))) }, 500, 3, byrow = TRUE) } attr(,"parameters") [1] " G2 vs G1" " G3 vs G1" Maximum Likelihood Estimates Standard Wald Chi-Sq: Parameter Estimate Error Param = 0 Prob > Wald Location: cons1 -0.48841 0.13667 12.772 3.5194e-04 cons2 1.48974 0.22609 43.417 4.4225e-11 cons3 4.83032 0.20473 556.667 0.0000e+00 Shape: 1.02755 0.047393 470.086 0 0.71929 0.049725 209.245 0 0.49476 0.052803 87.795 0 0.51742 0.059877 74.674 0 Mixture: G2 vs G1 -0.66678 0.28485 5.4794 1.9242e-02 G3 vs G1 -1.95838 0.23454 69.7196 1.1102e-16 Mean Mixture Probabilities: Group1 Group2 Group3 0.604432 0.310291 0.085277 -2*logLikelihood AIC BIC Entropy ICL-BIC Df 6444.913 6462.913 6513.321 174.8048 6862.931 1991 Mean Posterior Mixture Probabilities: Group1 Group2 Group3 0.60437 0.31026 0.08537 Posterior mean predicted values: Y1 Y2 Y3 Y4 Group1 0.88751 0.59788 0.4389 0.45326 Group2 2.01439 1.77054 1.6520 1.66199 Group3 4.87758 4.83675 4.8311 4.83130 Posterior mean observed values: Y1 Y2 Y3 Y4 Group1 0.8049 0.61452 0.52647 0.44847 Group2 2.9916 2.07996 1.51651 1.22118 Group3 4.5609 4.72376 4.77102 5.06115 > > cnorm.dat$ages<-cbind(1.7,3,4.2,5.6) > > ## Not run: > ##D # Last group is a linear function of time > ##D > ##D cnorm.dat$gmu1t<-list( > ##D Group1 = function(pmu) {pmu[1]*ages^0}, > ##D Group2 = function(pmu) {pmu[2]+pmu[3]*ages}, > ##D Group3 = function(pmu) {pmu[4]*ages^0}) > ##D > ##D cnorm.dat$cmean1t<-list( > ##D Group1 = function(p) {cmean(gmu1t[[1]](p[1:4]),gshape1[[1]](p[5]),0,14)}, > ##D Group2 = function(p) {cmean(gmu1t[[2]](p[1:4]),gshape1[[2]](p[5]),0,14)}, > ##D Group3 = function(p) {cmean(gmu1t[[3]](p[1:4]),gshape1[[3]](p[5]),0,14)}) > ##D > ##D moc4<- > ##D moc(moc.dat[,1:4],density=cnorm1,groups=3,gmu=gmu1t,gshape=gshape1, > ##D expected=cmean1t,pgmu=append(moc1$coef[1:3],0,after=2), > ##D pgshape=c(moc1$coef[4]),pgmix=moc1$coef[5:6],data=cnorm.dat,gradtol=1E-4) > ##D > ##D # Zero inflated Poisson log-linear in time for the third group > ##D # Be careful dpois requires integer values > ##D > ##D zip<- function(x,la,shape=1,extra) > ##D { mix<- exp(extra)/(1+exp(extra)) > ##D mix*(x == 0)+(1-mix)*dpois(x,la) } > ## End(Not run) > > ages<-cbind(1.7,3,4.2,5.6) > > gmup<-list( + Group1 = function(pmu) {exp(pmu[1]*ages^0)}, + Group2 = function(pmu) {exp(pmu[2]+pmu[3]*ages)}, + Group3 = function(pmu) {exp(pmu[4]*ages^0)}) > > ## Not run: > ##D zipfit<-list( > ##D Group1 = function(p) { gmup[[1]](p)/(1+exp(p[5]))}, > ##D Group2 = function(p) { gmup[[2]](p)/(1+exp(p[5]))}, > ##D Group3 = function(p) { gmup[[3]](p)/(1+exp(p[5]))}) > ##D > ##D gextrap<-list( > ##D Group1 = function(pxt) {t(1)%*%rep(pxt[1],4)}, > ##D Group2 = function(pxt) {t(1)%*%rep(pxt[1],4)}, > ##D Group3 = function(pxt) {t(1)%*%rep(pxt[1],4)}) > ##D > ##D moc5<- > ##D moc(moc.dat[,1:4],density=zip,groups=3,gmu=gmup,gextra=gextrap, > ##D expected = zipfit,pgmu=c(-0.6, 0.64,0, 1.6),pgextra=c(-3), > ##D pgmix=c(-0.7, -2), gradtol=1E-4) > ## End(Not run) > > # Standard Poisson with mixture depending on time independent > # dichotomous covariate > # Be aware that dpoiss require integer values > > dumm<-moc.dat[,5]-1 > gmixt<-function(pm){ + mix<-cbind(1,dumm)%*%matrix(pm[1:4],2,2) + cbind(1,exp(mix))/(1+apply(exp(mix),1,sum))} > > poiss<-function(x,la,...) {dpois(x,la)} > > moc6<- + moc(moc.dat[,1:4],density=poiss,groups=3,gmu=gmup,gmixture=gmixt, + pgmu=c(-0.6,0.64, 0, 1.6),pgmix=c(-0.2,-1, -1 ,-2),gradtol=1E-4) iteration = 0 Step: [1] 0 0 0 0 0 0 0 0 Parameter: [1] -0.60 0.64 0.00 1.60 -0.20 -1.00 -1.00 -2.00 Function Value [1] 3024.02 Gradient: [1] 78.7229949 -66.7517047 455.0181551 79.9674756 -0.3563897 4.2745935 [7] 2.9880946 0.9489738 Warning in dpois(x, lambda, log) : NaNs produced Warning in dpois(x, lambda, log) : NaNs produced Warning in dpois(x, lambda, log) : NaNs produced Warning: NA/Inf replaced by maximum positive value Warning in dpois(x, lambda, log) : NaNs produced Warning: NA/Inf replaced by maximum positive value iteration = 35 Parameter: [1] -0.7298243 1.9185369 -0.3657162 1.5070492 -0.1528912 -1.2565251 -1.0603288 [8] -2.0034138 Function Value [1] 2883.632 Gradient: [1] 0.018107767 -0.031724589 -0.131542993 0.002825467 -0.018040282 [6] -0.021266551 0.036499529 0.050561999 Relative gradient close to zero. Current iterate is probably solution. Estimation took 6.12 seconds. > > print(moc6) 3 mixtures MOC model Response: as.matrix(moc.dat[, 1:4]) Density: poiss function (x, la, ...) { dpois(x, la) } Location: gmup Group1 : function (pmu) { matrix({ exp(pmu[1] * ages^0) }, 500, 4, byrow = TRUE) } Group2 : function (pmu) { matrix({ exp(pmu[2] + pmu[3] * ages) }, 500, 4, byrow = TRUE) } Group3 : function (pmu) { matrix({ exp(pmu[4] * ages^0) }, 500, 4, byrow = TRUE) } Mixture: gmixt function (pm) { mix <- cbind(1, dumm) %*% matrix(pm[1:4], 2, 2) cbind(1, exp(mix))/(1 + apply(exp(mix), 1, sum)) } Maximum Likelihood Estimates Standard Wald Chi-Sq: Parameter Estimate Error Param = 0 Prob > Wald Location: -0.72982 0.051600 200.05 0 1.91854 0.082555 540.07 0 -0.36572 0.025258 209.64 0 1.50705 0.039072 1487.73 0 Mixture: -0.15289 0.14942 1.0469 3.0621e-01 -1.25653 0.24383 26.5562 2.5598e-07 -1.06033 0.19276 30.2586 3.7812e-08 -2.00341 0.42043 22.7069 1.8869e-06 Mean Mixture Probabilities: Group1 Group2 Group3 0.59612 0.30046 0.10341 -2*logLikelihood AIC BIC Entropy ICL-BIC Df 5767.265 5783.265 5828.072 74.84864 5977.769 1992 Mean Posterior Mixture Probabilities: Group1 Group2 Group3 0.59616 0.30050 0.10334 Posterior mean predicted values: Y1 Y2 Y3 Y4 Group1 0.48199 0.48199 0.48199 0.48199 Group2 3.65764 2.27365 1.46599 0.87856 Group3 4.51339 4.51339 4.51339 4.51339 Posterior mean observed values: Y1 Y2 Y3 Y4 Group1 0.41328 0.45536 0.53634 0.52294 Group2 3.66953 2.29052 1.40178 0.91428 Group3 4.40218 4.45352 4.40312 4.79481 > > obsfit.moc(moc6,along=dumm) $"Mean Prior Probabilities" dumm: 0 Group1 Group2 Group3 0.4536042 0.3892936 0.1571022 ------------------------------------------------------------ dumm: 1 Group1 Group2 Group3 0.77459432 0.18922241 0.03618327 $"Mean function Expected Values" dumm: 0 Y1 Y2 Y3 Y4 Group1 0.4819937 0.4819937 0.4819937 0.4819937 Group2 3.6576448 2.2736545 1.4659874 0.8785578 Group3 4.5133930 4.5133930 4.5133930 4.5133930 ------------------------------------------------------------ dumm: 1 Y1 Y2 Y3 Y4 Group1 0.4819937 0.4819937 0.4819937 0.4819937 Group2 3.6576448 2.2736545 1.4659874 0.8785578 Group3 4.5133930 4.5133930 4.5133930 4.5133930 $"Mean function Observed Values" dumm: 0 Y1 Y2 Y3 Y4 Group1 0.3536719 0.4649512 0.5301456 0.5352252 Group2 3.7960950 2.3935450 1.3603061 0.9135979 Group3 4.4768994 4.3339228 4.4391527 4.7070155 ------------------------------------------------------------ dumm: 1 Y1 Y2 Y3 Y4 Group1 0.4569831 0.4483318 0.5408739 0.5139370 Group2 3.3436469 2.0252324 1.5085647 0.9160358 Group3 3.9931922 5.1080879 4.2059191 5.2753157 $"Mean Posterior Probabilities" dumm: 0 Group1 Group2 Group3 0.4535639 0.3892828 0.1571532 ------------------------------------------------------------ dumm: 1 Group1 Group2 Group3 0.77472521 0.18931896 0.03595583 attr(,"moc.name") [1] "moc6" attr(,"FUN") function(x) x attr(,"along") [1] "dumm" > > entropy(moc1,moc3,moc6) Groups Total Prior Entropy Total Posterior Entropy moc1 3 435.5243 148.31537 moc3 3 438.6833 174.80479 moc6 3 423.1413 74.84864 Mean Prior Standardized Entropy Mean Posterior Standardized Entropy moc1 0.7928625 0.2700049 moc3 0.7986136 0.3182284 moc6 0.7703197 0.1362603 % Reduction moc1 0.6594555 moc3 0.6015240 moc6 0.8231120 > > ## Not run: > ##D plot(moc6,against=ages,main="MOC profiles",xlab="age",ylab="Y") > ##D plot(residuals(moc6)) > ## End(Not run) > > #More examples are available in the Examples directory of the library. > > > > ### *