R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.0 (2005-04-18), 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("mvnmle-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('mvnmle') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "apple" > > ### * apple > > flush(stderr()); flush(stdout()) > > ### Name: apple > ### Title: Worm Infestations in Apple Crops > ### Aliases: apple > ### Keywords: datasets > > ### ** Examples > > library(mvnmle) > data(apple) > > mlest(apple) $muhat [1] 14.72227 49.33325 $sigmahat [,1] [,2] [1,] 89.53415 -90.69653 [2,] -90.69653 114.69470 $value [1] 148.4350 $gradient [1] 4.988478e-06 2.891530e-06 9.105833e-07 1.681130e-05 -1.073772e-04 $stop.code [1] 1 $iterations [1] 34 > > > > cleanEx(); ..nameEx <- "missvals" > > ### * missvals > > flush(stderr()); flush(stdout()) > > ### Name: missvals > ### Title: A multivariate data set with missing values. > ### Aliases: missvals > ### Keywords: datasets > > ### ** Examples > > > library(mvnmle) > data(missvals) > > mlest(missvals, iterlim=400) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value $muhat [1] 6.655166 49.965258 11.769231 27.047090 95.423077 $sigmahat [,1] [,2] [,3] [,4] [,5] [1,] 21.82557 20.86434 -24.900391 -11.473443 46.95304 [2,] 20.86434 238.01242 -15.817376 -252.072297 195.60362 [3,] -24.90039 -15.81738 37.869825 -9.599213 -47.55622 [4,] -11.47344 -252.07230 -9.599213 294.183035 -190.59848 [5,] 46.95304 195.60362 -47.556218 -190.598482 208.90487 $value [1] 173.9566 $gradient [1] 6.795630e-07 5.465285e-07 1.021836e-06 7.125317e-07 2.387814e-07 [6] -2.139085e-06 1.739567e-06 8.401497e-08 1.563620e-05 -7.570407e-06 [11] -2.734879e-06 -1.400480e-06 -2.800817e-06 1.915258e-06 -1.362596e-05 [16] -7.266919e-08 -1.510186e-06 -5.165962e-06 1.473674e-06 5.397373e-06 $stop.code [1] 1 $iterations [1] 339 > > > > cleanEx(); ..nameEx <- "mlest" > > ### * mlest > > flush(stderr()); flush(stdout()) > > ### Name: mlest > ### Title: ML Estimation of Multivariate Normal Data > ### Aliases: mlest > ### Keywords: multivariate > > ### ** Examples > > library(mvnmle) > > data(apple) > mlest(apple) $muhat [1] 14.72227 49.33325 $sigmahat [,1] [,2] [1,] 89.53415 -90.69653 [2,] -90.69653 114.69470 $value [1] 148.4350 $gradient [1] 4.988478e-06 2.891530e-06 9.105833e-07 1.681130e-05 -1.073772e-04 $stop.code [1] 1 $iterations [1] 34 > > data(missvals) > mlest(missvals, iterlim=400) Warning: NA/Inf replaced by maximum positive value Warning: NA/Inf replaced by maximum positive value $muhat [1] 6.655166 49.965258 11.769231 27.047090 95.423077 $sigmahat [,1] [,2] [,3] [,4] [,5] [1,] 21.82557 20.86434 -24.900391 -11.473443 46.95304 [2,] 20.86434 238.01242 -15.817376 -252.072297 195.60362 [3,] -24.90039 -15.81738 37.869825 -9.599213 -47.55622 [4,] -11.47344 -252.07230 -9.599213 294.183035 -190.59848 [5,] 46.95304 195.60362 -47.556218 -190.598482 208.90487 $value [1] 173.9566 $gradient [1] 6.795630e-07 5.465285e-07 1.021836e-06 7.125317e-07 2.387814e-07 [6] -2.139085e-06 1.739567e-06 8.401497e-08 1.563620e-05 -7.570407e-06 [11] -2.734879e-06 -1.400480e-06 -2.800817e-06 1.915258e-06 -1.362596e-05 [16] -7.266919e-08 -1.510186e-06 -5.165962e-06 1.473674e-06 5.397373e-06 $stop.code [1] 1 $iterations [1] 339 > > > > > ### *