File: trees.q

package info (click to toggle)
sm 2.2-6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: f90: 259; ansic: 21; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diameter <- trees$Girth
volume   <- trees$Volume
height   <- trees$Height
h1 <- 1.5
h2 <- 4
par(mfrow=c(2,2))
par(cex=0.7)
sm.regression(diameter, volume, h = h1, model = "linear")
sm.regression(height, volume, h = h2, model = "linear")
X <- cbind(diameter, height)
sm.regression(X, volume, h = c(h1, h2), model = "linear",
	   zlim = c(0,80))
X <- cbind(log(diameter), log(height))
colnames(X) <- c("log(Diameter)","log(Height)")
sm.regression(X, log(volume), h = log(c(h1, h2)),
           model = "linear")
par(cex=1)
par(mfrow=c(1,1))