1. view scatterplots
(scatterplot-matrix )
2. regression
(regression-model
)
3. sir
(sir-i-ii-model
)
4. work on the low crime rate group .
++++++++++++++++++++++++++++++++
; finished loading "data-boston.lsp"
> (variables)
(DATA-B NAME-DATA-B)
> name-data-b
("log median house price" " crime rate" "proportion of zoned land"
"proportion of nonretail business acres" "charles river, 0,or 1, valued"
" nitrogen oxide concentration" "average number of rooms" "proportion of
old buildings" "weighted distances to 5 employment centers" "index of accessibility
to highways" "property tax rate" "pupil-teacher ratio" "balck proportion
of population" "proportion of the poor" "census tract name")
> (def y (nth 0 data-b))
Y
> (def x(select data-b (iseq 1 13)))
X
> (length x)
14
> (length (nth 0 x))
506
> (scatterplot-matrix data-b)
Error: Too many variables for scatmat (so I have to
select the first 10 variables to plot)
Happened in: #<Subr: #20c4728>
> (scatterplot-matrix x)
Error: Too many variables for scatmat
Happened in: #<Subr: #20c4728>
> (scatterplot-matrix (select data-b (iseq 0 9)))
#<Object: 24daa98, prototype = SCATMAT-PROTO>
> (def out-reg (regression-model x Y))
Least Squares Estimates:
Constant
11.0473 (0.202065)
Variable 0
-1.068486E-2 (1.286071E-3)
Variable 1
9.891505E-4 (5.177969E-4)
Variable 2
3.001842E-4 (2.421186E-3)
Variable 3
0.104434 (3.388521E-2)
Variable 4
-9.43747 (1.55374)
Variable 5
9.962087E-2 (1.623924E-2)
Variable 6
-3.124206E-4 (5.286174E-4)
Variable 7
-0.271113 (3.448673E-2)
Variable 8
0.105369 (1.961935E-2)
Variable 9
-4.730130E-4 (1.256371E-4)
Variable 10
-3.324492E-2 (5.069619E-3)
Variable 11
0.363184 (0.105657)
Variable 12
-2.90076 (0.199475)
R Squared:
0.796614
Sigma hat:
0.186762
Number of cases:
506
Degrees of freedom:
492
OUT-REG
> (send out-reg :plot-residuals)
#<Object: 257c478, prototype = SCATTERPLOT-PROTO>
;; look ok to fit a linear model ???
;; Now try sliced inverse regression
> (def out(sir-i-ii-model x y))