Last data update: 2014.03.03

R: Estimated value of a brand name product and the conpany's...
NameR Documentation

Estimated value of a brand name product and the conpany's revenue

Description

Data for Exercises 2.28, 9.19, and Example 2.8

Usage

Name

Format

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

Brand

a factor with levels Band-Aid Barbie Birds Eye Budweiser Camel Campbell Carlsberg Coca-Cola Colgate Del Monte Fisher-Price Gordon's} code{Green Giant} code{Guinness} code{Haagen-Dazs} code{Heineken} code{Heinz} code{Hennessy} code{Hermes} code{Hershey} code{Ivory} code{Jell-o} code{Johnnie Walker} code{Kellogg} code{Kleenex} code{Kraft} code{Louis Vuitton} code{Marlboro} code{Nescafe} code{Nestle} code{Nivea} code{Oil of Olay} code{Pampers} code{Pepsi-Cola} code{Planters} code{Quaker} code{Sara Lee} code{Schweppes} code{Smirnoff} code{Tampax} code{Winston} code{Wrigley's

value

a numeric vector

revenue

a numeric vector

Source

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

Examples

str(Name)
attach(Name)
plot(revenue,value)
model <- lm(value~revenue)
abline(model)
cor(value,revenue)
summary(model)
detach(Name)
remove(model)

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/Name.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Name
> ### Title: Estimated value of a brand name product and the conpany's
> ###   revenue
> ### Aliases: Name
> ### Keywords: datasets
> 
> ### ** Examples
> 
> str(Name)
'data.frame':	42 obs. of  3 variables:
 $ Brand  : Factor w/ 42 levels "Band-Aid","Barbie",..: 28 8 4 34 29 24 41 33 5 6 ...
 $ value  : num  31.2 24.4 10.1 9.6 8.5 8.4 6.1 6.1 4.4 3.9 ...
 $ revenue: num  15.4 8.4 6.2 5.5 4.3 4.7 3.6 4 2.3 2.4 ...
> attach(Name)
> plot(revenue,value)
> model <- lm(value~revenue)
> abline(model)
> cor(value,revenue)
[1] 0.9403903
> summary(model)

Call:
lm(formula = value ~ revenue)

Residuals:
    Min      1Q  Median      3Q     Max 
-7.5574 -0.3404  0.2231  0.6834  8.2840 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -0.8889     0.4174   -2.13   0.0394 *  
revenue       2.0244     0.1158   17.49   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.096 on 40 degrees of freedom
Multiple R-squared:  0.8843,	Adjusted R-squared:  0.8814 
F-statistic: 305.8 on 1 and 40 DF,  p-value: < 2.2e-16

> detach(Name)
> remove(model)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>