[Sleuth2-commits] r55 - in pkg/Sleuth3: . data inst/doc man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Feb 12 09:17:24 CET 2013
Author: berwin
Date: 2013-02-12 09:17:24 +0100 (Tue, 12 Feb 2013)
New Revision: 55
Modified:
pkg/Sleuth3/DESCRIPTION
pkg/Sleuth3/data/case0602.rda
pkg/Sleuth3/inst/doc/Sleuth3-manual.pdf
pkg/Sleuth3/man/case0501.Rd
pkg/Sleuth3/man/case0602.Rd
pkg/Sleuth3/man/case1802.Rd
Log:
Corrections to case0501.Rd, case0602.Rd and case0602.rda as pointed
out by Dan.
Corrections to case1802.Rd (explicit 'library(MASS)' call in example
section) to pass 'R CMD check' with R 2.15.2 Patched (2013-02-11
r61902) and R unstable (2013-02-11 r61902).
Bumped version number and date in DESCRIPTION, produced new manual.
Modified: pkg/Sleuth3/DESCRIPTION
===================================================================
--- pkg/Sleuth3/DESCRIPTION 2012-09-16 08:58:09 UTC (rev 54)
+++ pkg/Sleuth3/DESCRIPTION 2013-02-12 08:17:24 UTC (rev 55)
@@ -1,7 +1,7 @@
Package: Sleuth3
Title: Data sets from Ramsey and Schafer's "Statistical Sleuth (3rd ed)"
-Version: 0.1-4
-Date: 2012-09-12
+Version: 0.1-5
+Date: 2013-02-12
Author: Original by F.L. Ramsey and D.W. Schafer,
modifications by Daniel W. Schafer, Jeannie Sifneos and Berwin A. Turlach
Description: Data sets from Ramsey, F.L. and Schafer, D.W. (2013), "The
@@ -10,6 +10,6 @@
Maintainer: Berwin A Turlach <Berwin.Turlach at gmail.com>
LazyData: yes
Depends: R (>= 2.15.0)
-Suggests: lattice, multcomp, car, leaps, CCA, Hmisc
+Suggests: MASS, lattice, multcomp, car, leaps, CCA, Hmisc
License: GPL (>= 2)
URL: http://r-forge.r-project.org/projects/sleuth2/
Modified: pkg/Sleuth3/data/case0602.rda
===================================================================
(Binary files differ)
Modified: pkg/Sleuth3/inst/doc/Sleuth3-manual.pdf
===================================================================
(Binary files differ)
Modified: pkg/Sleuth3/man/case0501.Rd
===================================================================
--- pkg/Sleuth3/man/case0501.Rd 2012-09-16 08:58:09 UTC (rev 54)
+++ pkg/Sleuth3/man/case0501.Rd 2013-02-12 08:17:24 UTC (rev 55)
@@ -60,12 +60,12 @@
## p-VALUES AND CONFIDENCE INTERVALS FOR SPECIFIED COMPARISONS OF MEANS
if(require(multcomp)){
- diet <- factor(Diet,labels=c("lopro", "NN85", "NR40", "NR50", "NP", "RR50"))
+ diet <- factor(Diet,labels=c("NN85", "NR40", "NR50", "NP", "RR50", "lopro"))
myAov2 <- aov(Lifetime ~ diet - 1)
myComparisons <- glht(myAov2,
linfct=c("dietNR50 - dietNN85 = 0",
+ "dietRR50 - dietNR50 = 0",
"dietNR40 - dietNR50 = 0",
- "dietRR50 - dietNR50 = 0",
"dietlopro - dietNR50 = 0",
"dietNN85 - dietNP = 0") )
summary(myComparisons,test=adjusted("none")) # No multiple comparison adjust.
Modified: pkg/Sleuth3/man/case0602.Rd
===================================================================
--- pkg/Sleuth3/man/case0602.Rd 2012-09-16 08:58:09 UTC (rev 54)
+++ pkg/Sleuth3/man/case0602.Rd 2013-02-12 08:17:24 UTC (rev 55)
@@ -18,7 +18,7 @@
\format{
A data frame with 84 observations on the following 3 variables.
\describe{
- \item{Proportion}{The proportion of courtship time spent by 84
+ \item{Percentage}{The percentage of courtship time spent by 84
females with the yellow-sword males}
\item{Pair}{Factor variable with 6 levels---\code{"Pair1"},
\code{"Pair2"}, \code{"Pair3"}, \code{"Pair4"}, \code{"Pair5"} and
@@ -39,17 +39,17 @@
attach(case0602)
## EXPLORATION
-plot(Proportion ~ Length,
+plot(Percentage ~ Length,
xlab="Length of the Two Males",
- ylab="Proportion of Time Female Spent with Yellow-Sword Male",
- main="Proportion of Time Spent with Yellow Rather than Transparent Sword Male")
-abline(h=.5) # Draw a horizontal line at 0.5 (i.e. the "no preference" line)
-myAov <- aov(Proportion ~ Pair)
+ ylab="Percentage of Time Female Spent with Yellow-Sword Male",
+ main="Percentage of Time Spent with Yellow Rather than Transparent Sword Male")
+abline(h=50) # Draw a horizontal line at 50\% (i.e. the "no preference" line)
+myAov <- aov(Percentage ~ Pair)
plot(myAov, which=1) # Resdiual plot
summary(myAov)
# Explore possibility of linear effect, as in Display 6.5
-myAov2 <- aov(Proportion ~ Pair - 1) # Show the estimated means.
+myAov2 <- aov(Percentage ~ Pair - 1) # Show the estimated means.
myContrast <- rbind(c(5, -3, 1, 3, -9, 3))
if(require(multcomp)){ # Use the multcomp library
myComparison <- glht(myAov2, linfct=myContrast)
@@ -58,21 +58,21 @@
# Simpler exploration of linear effect, via regression (Ch. 7)
-myLm <- lm(Proportion ~ Length)
+myLm <- lm(Percentage ~ Length)
summary(myLm)
-# ONE-SAMPLE t-TEST THAT MEAN PROPORTION = 0.5, IGNORING MALE PAIR EFFECT
-t.test(Proportion, mu=.5, alternative="greater") # Get 1-sided p-value
-t.test(Proportion, alternative="two.sided") # Get C.I.
+# ONE-SAMPLE t-TEST THAT MEAN PERCENTAGE = 50\%, IGNORING MALE PAIR EFFECT
+t.test(Percentage, mu=50, alternative="greater") # Get 1-sided p-value
+t.test(Percentage, alternative="two.sided") # Get C.I.
## SCATTERPLOT FOR PRESENTATION
-plot(Proportion ~ Length,
+plot(Percentage ~ Length,
xlab="Length of the Two Males (mm)",
- ylab="Proportion of Time Female Spent with Yellow-Sword Male",
+ ylab="Percentage of Time Female Spent with Yellow-Sword Male",
main="Female Preference for Yellow Rather than Transparent Sword Male",
pch=21, lwd=2, bg="green", cex=1.5 )
-abline(h=.5,lty=2,col="blue",lwd=2)
-text(29.5,.52,"0.5 (no preference)", col="blue")
+abline(h=50,lty=2,col="blue",lwd=2)
+text(29.5,52,"50\% (no preference)", col="blue")
detach(case0602)
}
Modified: pkg/Sleuth3/man/case1802.Rd
===================================================================
--- pkg/Sleuth3/man/case1802.Rd 2012-09-16 08:58:09 UTC (rev 54)
+++ pkg/Sleuth3/man/case1802.Rd 2013-02-12 08:17:24 UTC (rev 55)
@@ -29,7 +29,8 @@
\examples{
str(case1802)
attach(case1802)
-
+
+library(MASS)
## INFERENCE (4 methods)
myTable <- cbind(Cold,NoCold)
row.names(myTable) <- c("Placebo","Vitamin C")
More information about the Sleuth2-commits
mailing list