
R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-mingw32/x64 (64-bit)

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 an HTML browser interface to help.
Type 'q()' to quit R.

> date()
[1] "Wed Mar 06 18:58:57 2013"
> ## See R20.14b
> data(armd, package = "nlmeU")
> 
> library(nlme)
> lm3.form <- formula(visual ~ visual0 + time + treat.f) 
> fm16.5 <- 
+    lme(lm3.form,             
+        random = list(subject = pdDiag(~time)),       
+        weights = varPower(form = ~time),
+        data = armd)     
> formula(fm16.5)                            # Recall formula
visual ~ visual0 + time + treat.f
> fixef(fm16.5)
  (Intercept)       visual0          time treat.fActive 
    5.4415585     0.8998272    -0.2415596    -2.6552826 
> detach(package:nlme)
> 
> library(nlmeU)
> Pwr(fm16.5)                                # Default call 
Power calculations: 
            numDF denDF  F-value       nc  Power
(Intercept)     1   632 8471.103 8471.103 1.0000
visual0         1   231  558.586  558.586 1.0000
time            1   632  102.116  102.116 1.0000
treat.f         1   231    5.534    5.534 0.6491
> Pwr(fm16.5,  L = c("treat.fActive" = 1))   # The L argument
Power calculations for a linear combination: 
treat.fActive 
            1 
  numDF denDF  F-value       nc  Power
1     1   231 5.534487 5.534487 0.6491
> packageVersion("nlme")
[1] '3.1.103'
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=C                          
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] nlmeU_0.30-7

loaded via a namespace (and not attached):
[1] grid_2.15.0    lattice_0.20-6 nlme_3.1-103   tools_2.15.0  
> detach(package:nlmeU)
> 
> proc.time()
   user  system elapsed 
   0.78    0.06    0.84 
