Submitted by: Submitted by tolalet
Views: 105
Words: 632
Pages: 3
Category: Literature
Date Submitted: 03/19/2014 11:04 PM
R Console
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-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.
Natural language support but running in an English locale
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(fBasics)
Loading required package: MASS
Loading required package: timeDate
Loading required package: timeSeries
Attaching package: ‘fBasics’
The following object is masked from ‘package:base’:
norm
> da=read.table("m-ibmsp6709.txt",header=T)
> head(da)
date ibm sp
1 19670131 0.075370 0.078178
2 19670228 0.079099 0.001963
3 19670331 0.048837 0.039410
4 19670428 0.100887 0.042239
5 19670531 -0.035234 -0.052441
6 19670630 0.067024 0.017512
> ibm=log(da$ibm+1)
> sp=log(da$sp+1)
> cor(ibm, sp)
[1] 0.5874154
> library(fBasics)
> da=read.table("m-ibmsp6709.txt",header=T)
> head(da)
date ibm sp
1 19670131 0.075370 0.078178
2 19670228 0.079099 0.001963
3 19670331 0.048837 0.039410
4 19670428 0.100887 0.042239
5 19670531 -0.035234 -0.052441
6 19670630 0.067024 0.017512
> ibm=log(da$ibm+1)
> sp=log(da$sp+1)
> cor(ibm, sp, method="spearman")
[1] 0.5860817
> library(fBasics)
> da=read.table("m-ibmsp6709.txt",header=T)
> head(da)
date ibm sp
1 19670131 0.075370 0.078178
2 19670228 0.079099 0.001963
3 19670331 0.048837 0.039410
4 19670428 0.100887 0.042239
5 19670531 -0.035234 -0.052441
6 19670630...