Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_cloud.wasp
Title produced by softwareTrivariate Scatterplots
Date of computationTue, 11 Nov 2008 12:53:33 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Nov/11/t1226433289be9zedgi0c12hvr.htm/, Retrieved Sun, 19 May 2024 11:18:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=23907, Retrieved Sun, 19 May 2024 11:18:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact106
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [Trivariate Scatterplots] [Q1] [2008-11-11 19:53:33] [787873b6436f665b5b192a0bdb2e43c9] [Current]
Feedback Forum
2008-11-14 10:18:31 [Tamara Witters] [reply
Trivariate Scatterplots:
Deze R-module biedt veel voordelen. Het maakt verschillende berekeningen in 1 keer met o. a de Bivarlate kernel density.

Je krijgt eerst 3 vierkanten te zien die telkens het verband tussen 3 variabelen weergeven. Het nadeel hiervan is dat je de afstand tussen de punten niet goed kan inschatten.

Vervolgens is er het 2-dimensioneel scatterplot. Je kan hieruit afleiden of een variabele een normaalverdeling heeft en of er correlatie is tussen de verschillende variabelen. Het tweede kadertje bijvoorbeeld geeft het verband weer tussen import en export, we kunnen zien dat er een grote correlatie bestaat want de punten liggen dicht bij elkaar en op 1 lijn. Hoe dichter de punten hoe groter de waarschijnlijkheid. Het nadeel van deze methode is dat je een vertekend beeld kan krijgen.

Tenslotte krijg je ook nog de bivariate kernel densityte zien maar deze heb ik reeds besproken bij mijn vorige blog.

Post a new message
Dataseries X:
0.95
0.98
1.23
1.17
0.84
0.74
0.65
0.91
1.19
1.30
1.53
1.94
1.79
1.95
2.26
2.04
2.16
2.75
2.79
2.88
3.36
2.97
3.10
2.49
2.20
2.25
2.09
2.79
3.14
2.93
2.65
2.67
2.26
2.35
2.13
2.18
2.90
2.63
2.67
1.81
1.33
0.88
1.28
1.26
1.26
1.29
1.10
1.37
1.21
1.74
1.76
1.48
1.04
1.62
1.49
1.79
1.8
1.58
1.86
1.74
1.59
1.26
1.13
1.92
2.61
2.26
2.41
2.26
2.03
2.86
2.55
2.27
2.26
2.57
3.07
2.76
2.51
2.87
3.14
3.11
3.16
2.47
2.57
2.89
2.63
2.38
1.69
1.96
2.19
1.87
1.6
1.63
1.22
1.21
1.49
1.64
1.66
1.77
1.82
1.78
1.28
1.29
1.37
1.12
1.51
2.24
2.94
3.09
3.46
3.64
4.39
4.15
5.21
5.80
5.91
Dataseries Y:
13.92
13.22
13.31
12.91
13.19
12.92
13.43
13.72
13.97
14.91
14.46
14.12
14.23
15.04
14.80
14.49
15.14
14.34
15.12
15.14
14.34
14.36
14.91
15.56
16.50
15.57
15.14
15.19
15.07
14.48
14.27
14.72
14.65
14.38
13.95
14.85
14.87
14.83
15.03
15.47
16.21
16.55
17.04
17.22
17.47
17.75
17.84
18.47
18.38
18.55
18.39
18.88
20.21
19.67
20.09
18.78
19.74
20.64
20.34
21.75
22.10
22.81
22.91
22.46
21.78
25.05
23.70
23.02
24.34
24.15
25.85
26.42
26.54
26.36
26.99
27.52
26.63
26.26
24.86
26.84
26.57
24.67
27.24
27.77
27.61
27.27
28.46
26.97
29.95
29.88
29.67
31.19
30.24
30.03
31.02
30.45
31.70
32.10
32.32
32.18
33.43
33.07
35.32
35.17
35.29
37.89
38.32
37.07
39.77
39.20
40.46
44.95
41.69
41.88
45.86
Dataseries Z:
15.22
14.28
14.61
14.19
14.02
14.22
14.80
15.05
15.24
15.85
15.43
15.41
15.53
15.95
15.72
15.68
16.06
15.27
16.01
15.44
15.47
15.49
15.38
16.62
17.25
16.37
16.14
15.76
15.54
15.46
15.26
16.02
15.67
15.67
15.48
16.07
16.65
16.18
16.55
16.58
17.73
17.94
18.66
18.73
19.07
19.48
19.52
19.60
20.32
19.84
19.81
20.64
22.12
21.50
21.77
20.29
21.76
22.35
22.15
23.83
24.46
25.13
24.36
24.45
23.66
25.97
25.20
24.41
25.32
26.36
28.03
28.95
27.25
27.47
28.75
29.24
28.03
27.34
26.47
28.30
27.90
26.69
28.31
28.84
28.56
28.25
28.93
28.22
31.77
31.64
30.60
32.34
31.51
31.39
32.19
33.11
33.99
34.30
34.53
33.67
34.72
34.91
36.24
37.47
36.94
38.55
39.88
37.78
40.09
40.17
40.67
44.82
40.89
41.47
44.67




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=23907&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=23907&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=23907&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135



Parameters (Session):
par1 = 50 ; par2 = 50 ; par3 = Y ; par4 = Y ; par5 = inflatie ; par6 = import ; par7 = export ;
Parameters (R input):
par1 = 50 ; par2 = 50 ; par3 = Y ; par4 = Y ; par5 = inflatie ; par6 = import ; par7 = export ;
R code (references can be found in the software module):
x <- array(x,dim=c(length(x),1))
colnames(x) <- par5
y <- array(y,dim=c(length(y),1))
colnames(y) <- par6
z <- array(z,dim=c(length(z),1))
colnames(z) <- par7
d <- data.frame(cbind(z,y,x))
colnames(d) <- list(par7,par6,par5)
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
if (par1>500) par1 <- 500
if (par2>500) par2 <- 500
if (par1<10) par1 <- 10
if (par2<10) par2 <- 10
library(GenKern)
library(lattice)
panel.hist <- function(x, ...)
{
usr <- par('usr'); on.exit(par(usr))
par(usr = c(usr[1:2], 0, 1.5) )
h <- hist(x, plot = FALSE)
breaks <- h$breaks; nB <- length(breaks)
y <- h$counts; y <- y/max(y)
rect(breaks[-nB], 0, breaks[-1], y, col='black', ...)
}
bitmap(file='cloud1.png')
cloud(z~x*y, screen = list(x=-45, y=45, z=35),xlab=par5,ylab=par6,zlab=par7)
dev.off()
bitmap(file='cloud2.png')
cloud(z~x*y, screen = list(x=35, y=45, z=25),xlab=par5,ylab=par6,zlab=par7)
dev.off()
bitmap(file='cloud3.png')
cloud(z~x*y, screen = list(x=35, y=-25, z=90),xlab=par5,ylab=par6,zlab=par7)
dev.off()
bitmap(file='pairs.png')
pairs(d,diag.panel=panel.hist)
dev.off()
x <- as.vector(x)
y <- as.vector(y)
z <- as.vector(z)
bitmap(file='bidensity1.png')
op <- KernSur(x,y, xgridsize=par1, ygridsize=par2, correlation=cor(x,y), xbandwidth=dpik(x), ybandwidth=dpik(y))
image(op$xords, op$yords, op$zden, col=terrain.colors(100), axes=TRUE,main='Bivariate Kernel Density Plot (x,y)',xlab=par5,ylab=par6)
if (par3=='Y') contour(op$xords, op$yords, op$zden, add=TRUE)
if (par4=='Y') points(x,y)
(r<-lm(y ~ x))
abline(r)
box()
dev.off()
bitmap(file='bidensity2.png')
op <- KernSur(y,z, xgridsize=par1, ygridsize=par2, correlation=cor(y,z), xbandwidth=dpik(y), ybandwidth=dpik(z))
op
image(op$xords, op$yords, op$zden, col=terrain.colors(100), axes=TRUE,main='Bivariate Kernel Density Plot (y,z)',xlab=par6,ylab=par7)
if (par3=='Y') contour(op$xords, op$yords, op$zden, add=TRUE)
if (par4=='Y') points(y,z)
(r<-lm(z ~ y))
abline(r)
box()
dev.off()
bitmap(file='bidensity3.png')
op <- KernSur(x,z, xgridsize=par1, ygridsize=par2, correlation=cor(x,z), xbandwidth=dpik(x), ybandwidth=dpik(z))
op
image(op$xords, op$yords, op$zden, col=terrain.colors(100), axes=TRUE,main='Bivariate Kernel Density Plot (x,z)',xlab=par5,ylab=par7)
if (par3=='Y') contour(op$xords, op$yords, op$zden, add=TRUE)
if (par4=='Y') points(x,z)
(r<-lm(z ~ x))
abline(r)
box()
dev.off()