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("MEMSS-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('MEMSS') Loading required package: lme4 Loading required package: Matrix Loading required package: lattice > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "Alfalfa" > > ### * Alfalfa > > flush(stderr()); flush(stdout()) > > ### Name: Alfalfa > ### Title: Split-Plot Experiment on Varieties of Alfalfa > ### Aliases: Alfalfa > ### Keywords: datasets > > ### ** Examples > > data(Alfalfa) > > > > cleanEx(); ..nameEx <- "Assay" > > ### * Assay > > flush(stderr()); flush(stdout()) > > ### Name: Assay > ### Title: Bioassay on Cell Culture Plate > ### Aliases: Assay > ### Keywords: datasets > > ### ** Examples > > data(Assay) > > > > cleanEx(); ..nameEx <- "BodyWeight" > > ### * BodyWeight > > flush(stderr()); flush(stdout()) > > ### Name: BodyWeight > ### Title: Rat weight over time for different diets > ### Aliases: BodyWeight > ### Keywords: datasets > > ### ** Examples > > data(BodyWeight) > > > > cleanEx(); ..nameEx <- "Cefamandole" > > ### * Cefamandole > > flush(stderr()); flush(stdout()) > > ### Name: Cefamandole > ### Title: Pharmacokinetics of Cefamandole > ### Aliases: Cefamandole > ### Keywords: datasets > > ### ** Examples > > data(Cefamandole) > plot(Cefamandole) > #fm1 <- nlsList(SSbiexp, data = Cefamandole) > #summary(fm1) > > > > cleanEx(); ..nameEx <- "Dialyzer" > > ### * Dialyzer > > flush(stderr()); flush(stdout()) > > ### Name: Dialyzer > ### Title: High-Flux Hemodialyzer > ### Aliases: Dialyzer > ### Keywords: datasets > > ### ** Examples > > data(Dialyzer) > > > > cleanEx(); ..nameEx <- "Earthquake" > > ### * Earthquake > > flush(stderr()); flush(stdout()) > > ### Name: Earthquake > ### Title: Earthquake Intensity > ### Aliases: Earthquake > ### Keywords: datasets > > ### ** Examples > > data(Earthquake) > > > > cleanEx(); ..nameEx <- "Fatigue" > > ### * Fatigue > > flush(stderr()); flush(stdout()) > > ### Name: Fatigue > ### Title: Cracks caused by metal fatigue > ### Aliases: Fatigue > ### Keywords: datasets > > ### ** Examples > > data(Fatigue) > > > > cleanEx(); ..nameEx <- "Gasoline" > > ### * Gasoline > > flush(stderr()); flush(stdout()) > > ### Name: Gasoline > ### Title: Refinery yield of gasoline > ### Aliases: Gasoline > ### Keywords: datasets > > ### ** Examples > > data(Gasoline) > > > > cleanEx(); ..nameEx <- "Glucose" > > ### * Glucose > > flush(stderr()); flush(stdout()) > > ### Name: Glucose > ### Title: Glucose levels over time > ### Aliases: Glucose > ### Keywords: datasets > > ### ** Examples > > data(Glucose) > > > > cleanEx(); ..nameEx <- "Glucose2" > > ### * Glucose2 > > flush(stderr()); flush(stdout()) > > ### Name: Glucose2 > ### Title: Glucose Levels Following Alcohol Ingestion > ### Aliases: Glucose2 > ### Keywords: datasets > > ### ** Examples > > data(Glucose2) > > > > cleanEx(); ..nameEx <- "Gun" > > ### * Gun > > flush(stderr()); flush(stdout()) > > ### Name: Gun > ### Title: Methods for firing naval guns > ### Aliases: Gun > ### Keywords: datasets > > ### ** Examples > > data(Gun) > > > > cleanEx(); ..nameEx <- "IGF" > > ### * IGF > > flush(stderr()); flush(stdout()) > > ### Name: IGF > ### Title: Radioimmunoassay of IGF-I Protein > ### Aliases: IGF > ### Keywords: datasets > > ### ** Examples > > data(IGF) > > > > cleanEx(); ..nameEx <- "Machines" > > ### * Machines > > flush(stderr()); flush(stdout()) > > ### Name: Machines > ### Title: Productivity Scores for Machines and Workers > ### Aliases: Machines > ### Keywords: datasets > > ### ** Examples > > data(Machines) > > > > cleanEx(); ..nameEx <- "MathAchSchool" > > ### * MathAchSchool > > flush(stderr()); flush(stdout()) > > ### Name: MathAchSchool > ### Title: School demographic data for MathAchieve > ### Aliases: MathAchSchool > ### Keywords: datasets > > ### ** Examples > > data(MathAchSchool) > > > > cleanEx(); ..nameEx <- "MathAchieve" > > ### * MathAchieve > > flush(stderr()); flush(stdout()) > > ### Name: MathAchieve > ### Title: Mathematics achievement scores > ### Aliases: MathAchieve > ### Keywords: datasets > > ### ** Examples > > data(MathAchieve) > > > > cleanEx(); ..nameEx <- "Meat" > > ### * Meat > > flush(stderr()); flush(stdout()) > > ### Name: Meat > ### Title: Tenderness of meat > ### Aliases: Meat > ### Keywords: datasets > > ### ** Examples > > data(Meat) > > > > cleanEx(); ..nameEx <- "Milk" > > ### * Milk > > flush(stderr()); flush(stdout()) > > ### Name: Milk > ### Title: Protein content of cows' milk > ### Aliases: Milk > ### Keywords: datasets > > ### ** Examples > > data(Milk) > > > > cleanEx(); ..nameEx <- "Muscle" > > ### * Muscle > > flush(stderr()); flush(stdout()) > > ### Name: Muscle > ### Title: Contraction of heart muscle sections > ### Aliases: Muscle > ### Keywords: datasets > > ### ** Examples > > data(Muscle) > > > > cleanEx(); ..nameEx <- "Nitrendipene" > > ### * Nitrendipene > > flush(stderr()); flush(stdout()) > > ### Name: Nitrendipene > ### Title: Assay of nitrendipene > ### Aliases: Nitrendipene > ### Keywords: datasets > > ### ** Examples > > data(Nitrendipene) > > > > cleanEx(); ..nameEx <- "Oats" > > ### * Oats > > flush(stderr()); flush(stdout()) > > ### Name: Oats > ### Title: Split-plot Experiment on Varieties of Oats > ### Aliases: Oats > ### Keywords: datasets > > ### ** Examples > > data(Oats) > > > > cleanEx(); ..nameEx <- "Orthodont" > > ### * Orthodont > > flush(stderr()); flush(stdout()) > > ### Name: Orthodont > ### Title: Growth curve data on an orthdontic measurement > ### Aliases: Orthodont > ### Keywords: datasets > > ### ** Examples > > data(Orthodont) > formula(Orthodont) distance ~ age + Subject + Sex > plot(Orthodont) > > > > cleanEx(); ..nameEx <- "Ovary" > > ### * Ovary > > flush(stderr()); flush(stdout()) > > ### Name: Ovary > ### Title: Counts of Ovarian Follicles > ### Aliases: Ovary > ### Keywords: datasets > > ### ** Examples > > data(Ovary) > > > > cleanEx(); ..nameEx <- "Oxide" > > ### * Oxide > > flush(stderr()); flush(stdout()) > > ### Name: Oxide > ### Title: Variability in Semiconductor Manufacturing > ### Aliases: Oxide > ### Keywords: datasets > > ### ** Examples > > data(Oxide) > > > > cleanEx(); ..nameEx <- "PBG" > > ### * PBG > > flush(stderr()); flush(stdout()) > > ### Name: PBG > ### Title: Effect of Phenylbiguanide on Blood Pressure > ### Aliases: PBG > ### Keywords: datasets > > ### ** Examples > > data(PBG) > > > > cleanEx(); ..nameEx <- "Phenobarb" > > ### * Phenobarb > > flush(stderr()); flush(stdout()) > > ### Name: Phenobarb > ### Title: Phenobarbitol Kinetics > ### Aliases: Phenobarb > ### Keywords: datasets > > ### ** Examples > > data(Phenobarb) > > > > cleanEx(); ..nameEx <- "Pixel" > > ### * Pixel > > flush(stderr()); flush(stdout()) > > ### Name: Pixel > ### Title: X-ray pixel intensities over time > ### Aliases: Pixel > ### Keywords: datasets > > ### ** Examples > > options(show.signif.stars = FALSE) > str(Pixel) `data.frame': 102 obs. of 5 variables: $ Dog : Factor w/ 10 levels "1","10","2","3",..: 1 1 1 1 1 1 1 3 3 3 ... $ Side : Factor w/ 2 levels "L","R": 2 2 2 2 2 2 2 2 2 2 ... $ day : num 0 1 2 4 6 10 14 0 1 2 ... $ pixel: num 1046 1044 1043 1050 1045 ... $ DS : Factor w/ 20 levels "1:L","1:R","10:L",..: 2 2 2 2 2 2 2 6 6 6 ... - attr(*, "ginfo")=List of 7 ..$ formula :Class 'formula' length 3 pixel ~ day | Dog/Side .. .. ..- attr(*, ".Environment")=length 2 ..$ order.groups:List of 2 .. ..$ Dog : logi TRUE .. ..$ Side: logi TRUE ..$ FUN :function (x) .. ..- attr(*, "source")= chr "function (x) max(x, na.rm = TRUE)" ..$ outer : NULL ..$ inner : NULL ..$ labels :List of 2 .. ..$ day : chr "Time post injection" .. ..$ pixel: chr "Pixel intensity" ..$ units :List of 1 .. ..$ day: chr "(days)" > summary(Pixel) Dog Side day pixel DS 1 :14 L:51 Min. : 0.00 Min. :1034 1:L : 7 2 :14 R:51 1st Qu.: 4.00 1st Qu.:1054 1:R : 7 3 :14 Median : 6.00 Median :1088 2:L : 7 4 :14 Mean : 7.49 Mean :1087 2:R : 7 5 :10 3rd Qu.:10.00 3rd Qu.:1110 3:L : 7 6 :10 Max. :21.00 Max. :1161 3:R : 7 (Other):26 (Other):60 > (fm1 <- lmer(pixel ~ day + I(day^2) + (1|DS) + (day|Dog), Pixel)) Linear mixed-effects model fit by REML Formula: pixel ~ day + I(day^2) + (1 | DS) + (day | Dog) Data: Pixel AIC BIC logLik MLdeviance REMLdeviance 841.2102 862.21 -412.6051 827.3295 825.2102 Random effects: Groups Name Variance Std.Dev. Corr DS (Intercept) 283.0883 16.8252 Dog (Intercept) 804.6028 28.3655 day 3.3993 1.8437 -0.555 Residual 80.8153 8.9897 # of obs: 102, groups: DS, 20; Dog, 10 Fixed effects: Estimate Std. Error DF t value Pr(>|t|) (Intercept) 1073.339079 10.170549 99 105.5340 < 2.2e-16 day 6.129604 0.879319 99 6.9709 3.557e-10 I(day^2) -0.367350 0.033946 99 -10.8216 < 2.2e-16 > > > > cleanEx(); ..nameEx <- "Quinidine" > > ### * Quinidine > > flush(stderr()); flush(stdout()) > > ### Name: Quinidine > ### Title: Quinidine Kinetics > ### Aliases: Quinidine > ### Keywords: datasets > > ### ** Examples > > data(Quinidine) > > > > cleanEx(); ..nameEx <- "Rail" > > ### * Rail > > flush(stderr()); flush(stdout()) > > ### Name: Rail > ### Title: Evaluation of Stress in Railway Rails > ### Aliases: Rail > ### Keywords: datasets > > ### ** Examples > > data(Rail) > > > > cleanEx(); ..nameEx <- "RatPupWeight" > > ### * RatPupWeight > > flush(stderr()); flush(stdout()) > > ### Name: RatPupWeight > ### Title: The weight of rat pups > ### Aliases: RatPupWeight > ### Keywords: datasets > > ### ** Examples > > data(RatPupWeight) > > > > cleanEx(); ..nameEx <- "Relaxin" > > ### * Relaxin > > flush(stderr()); flush(stdout()) > > ### Name: Relaxin > ### Title: Assay for Relaxin > ### Aliases: Relaxin > ### Keywords: datasets > > ### ** Examples > > data(Relaxin) > > > > cleanEx(); ..nameEx <- "Remifentanil" > > ### * Remifentanil > > flush(stderr()); flush(stdout()) > > ### Name: Remifentanil > ### Title: Pharmacokinetics of remifentanil > ### Aliases: Remifentanil > ### Keywords: datasets > > ### ** Examples > > data(Remifentanil) > > > > cleanEx(); ..nameEx <- "Soybean" > > ### * Soybean > > flush(stderr()); flush(stdout()) > > ### Name: Soybean > ### Title: Growth of soybean plants > ### Aliases: Soybean > ### Keywords: datasets > > ### ** Examples > > data(Soybean) > #summary(fm1 <- nlsList(SSlogis, data = Soybean)) > > > > cleanEx(); ..nameEx <- "Spruce" > > ### * Spruce > > flush(stderr()); flush(stdout()) > > ### Name: Spruce > ### Title: Growth of Spruce Trees > ### Aliases: Spruce > ### Keywords: datasets > > ### ** Examples > > data(Spruce) > > > > cleanEx(); ..nameEx <- "Tetracycline1" > > ### * Tetracycline1 > > flush(stderr()); flush(stdout()) > > ### Name: Tetracycline1 > ### Title: Pharmacokinetics of tetracycline > ### Aliases: Tetracycline1 > ### Keywords: datasets > > ### ** Examples > > data(Tetracycline1) > > > > cleanEx(); ..nameEx <- "Tetracycline2" > > ### * Tetracycline2 > > flush(stderr()); flush(stdout()) > > ### Name: Tetracycline2 > ### Title: Pharmacokinetics of tetracycline > ### Aliases: Tetracycline2 > ### Keywords: datasets > > ### ** Examples > > data(Tetracycline2) > > > > cleanEx(); ..nameEx <- "Wafer" > > ### * Wafer > > flush(stderr()); flush(stdout()) > > ### Name: Wafer > ### Title: Modeling of Analog MOS Circuits > ### Aliases: Wafer > ### Keywords: datasets > > ### ** Examples > > data(Wafer) > > > > cleanEx(); ..nameEx <- "Wheat" > > ### * Wheat > > flush(stderr()); flush(stdout()) > > ### Name: Wheat > ### Title: Yields by growing conditions > ### Aliases: Wheat > ### Keywords: datasets > > ### ** Examples > > data(Wheat) > > > > cleanEx(); ..nameEx <- "Wheat2" > > ### * Wheat2 > > flush(stderr()); flush(stdout()) > > ### Name: Wheat2 > ### Title: Wheat Yield Trials > ### Aliases: Wheat2 > ### Keywords: datasets > > ### ** Examples > > data(Wheat2) > > > > cleanEx(); ..nameEx <- "ergoStool" > > ### * ergoStool > > flush(stderr()); flush(stdout()) > > ### Name: ergoStool > ### Title: Ergometrics experiment with stool types > ### Aliases: ergoStool > ### Keywords: datasets > > ### ** Examples > > options(show.signif.stars = FALSE) > data(ergoStool) > (fm1 <- lmer(effort ~ Type + (1|Subject), ergoStool)) Linear mixed-effects model fit by REML Formula: effort ~ Type + (1 | Subject) Data: ergoStool AIC BIC logLik MLdeviance REMLdeviance 133.1308 142.6319 -60.5654 122.1444 121.1308 Random effects: Groups Name Variance Std.Dev. Subject (Intercept) 1.7755 1.3325 Residual 1.2106 1.1003 # of obs: 36, groups: Subject, 9 Fixed effects: Estimate Std. Error DF t value Pr(>|t|) (Intercept) 8.55556 0.57601 32 14.8531 6.556e-16 TypeT2 3.88889 0.51868 32 7.4976 1.551e-08 TypeT3 2.22222 0.51868 32 4.2843 0.0001566 TypeT4 0.66667 0.51868 32 1.2853 0.2079108 > anova(fm1) Analysis of Variance Table Df Sum Sq Mean Sq Denom F value Pr(>F) Type 3 81.194 27.065 32.000 22.356 5.411e-08 > > > > ### *