0-1
Agenda for today
- 1. Descriptive Data Analysis
- 2. Graphics
Agenda for today 1. Descriptive Data Analysis 2. Graphics XploRe - - PowerPoint PPT Presentation
0-1 Agenda for today 1. Descriptive Data Analysis 2. Graphics XploRe Descriptive Data Analysis 1-2 Prerequisites library("xplore") 1 library("stats") 2 setenv(" outputstringformat ","%s") 3 Avoid
1
2
3
1 x = read("file") 2
3 x = readm("file") 4
1 d = dim(x) 2
3 n = rows(x) 4
5 p = cols(x) 6
7 y = x[i,j] or y = x[i,] or y = x[,j] 8
9 z = x[k:l,m:n] 10
1 mx = min(x {,d}) 2
3 mx = max(x {,d}) 4
1 mx = mean(x {,d}) 2
3 vx = var(x {,d}) 4
5 kx = kurtosis(x) 6
7 sx = skewness(x) 8
1 mx = median(x) 2
3 qx = quantile(x, alpha) 4
1 cx = cov(x) 2
3 rx = corr(x) 4
1 {xr , r} = discrete(x {,y}) 2
3
4
1 setenv(" outputstringformat ","%s") 2
3
4 earn=read("cps85") 5 earn=earn [ ,1|2|5|8|10|11|12] 6 {cat ,freq}=discrete(earn [,3]) 7 cat 8 freq
1 nx = countNaN(x) 2
3 nx = countNotNumber (x) 4
5 ix = isNaN (x) 6
7 ix = isInf (x) 8
1 ix = isNumber (x) 2
3 y = paf(x, i) 4
5 y = replace(x, w, b) 6
1 s = summarize(x {,xvars }) 2
3 s = fivenum(x {,xvars }) 4
5 s = descriptive(x {,xvars }) 6
1 s = summarize(x {,xvars }) 2
3 s = fivenum(x {,xvars }) 4
5 s = descriptive(x {,xvars }) 6
1 s = frequency(x {, xvars {, outwidth }}) 2
3 s = crosstable(x{,xvars }) 4
5
1 plot(x1 {, x2 { ,...{x5 }}}) 2
3 line(x1 {, x2 {, ... {x5 }}}) 4
5 y = setmask (x, opt1 {, opt2 {, ... {opt9 }}}) 6
7 disp = createdisplay (r,c) 8
9 show(disp , i, j, x1 {, x2 {, ... {, xn }}}) 10
1
2 data = read ("bostonh")
3 x = data [ ,13:14]
4 plot(x)
10 20 30 X 10 20 30 40 50 Y
1
2 xmin = 0
3 xmax = 2*pi
4 n
5 x = xmin + (xmax -xmin)/(n-1) .* (0:n-1) 6 ; generates
7 y = sin(x)
8 plot(x~y)
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
11
12
13
1 disp = createdisplay (rownum , colnum) 2 3 show(disp ,<row>,<col>, what)