Last data update: 2014.03.03

R: Moral attitude scale on 15 subjects before and after viewing...
MovieR Documentation

Moral attitude scale on 15 subjects before and after viewing a movie

Description

Data for Exercise 7.53

Usage

Movie

Format

A data frame with 12 observations on the following 3 variables.

Before

a numeric vector

After

a numeric vector

differ

a numeric vector

Source

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Duxbury

Examples

str(Movie)
attach(Movie)
qqnorm(differ)
qqline(differ)
shapiro.test(differ)
t.test(After,Before,paired=TRUE,conf.level=.99)
wilcox.test(After,Before,paired=TRUE)
detach(Movie)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.

> library(BSDA)
Loading required package: e1071
Loading required package: lattice

Attaching package: 'BSDA'

The following object is masked from 'package:datasets':

    Orange

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BSDA/Movie.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Movie
> ### Title: Moral attitude scale on 15 subjects before and after viewing a
> ###   movie
> ### Aliases: Movie
> ### Keywords: datasets
> 
> ### ** Examples
> 
> str(Movie)
'data.frame':	12 obs. of  3 variables:
 $ Before: int  14 16 15 18 15 17 19 17 17 16 ...
 $ After : int  14 18 16 17 16 19 20 18 19 15 ...
 $ differ: int  0 2 1 -1 1 2 1 1 2 -1 ...
> attach(Movie)
> qqnorm(differ)
> qqline(differ)
> shapiro.test(differ)

	Shapiro-Wilk normality test

data:  differ
W = 0.83643, p-value = 0.02506

> t.test(After,Before,paired=TRUE,conf.level=.99)

	Paired t-test

data:  After and Before
t = 2, df = 11, p-value = 0.0708
alternative hypothesis: true difference in means is not equal to 0
99 percent confidence interval:
 -0.3686022  1.7019355
sample estimates:
mean of the differences 
              0.6666667 

> wilcox.test(After,Before,paired=TRUE)

	Wilcoxon signed rank test with continuity correction

data:  After and Before
V = 52.5, p-value = 0.07707
alternative hypothesis: true location shift is not equal to 0

Warning messages:
1: In wilcox.test.default(After, Before, paired = TRUE) :
  cannot compute exact p-value with ties
2: In wilcox.test.default(After, Before, paired = TRUE) :
  cannot compute exact p-value with zeroes
> detach(Movie)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>