if (FALSE) {
with(airquality, {
x <- cbind(Wind, Temp)
y <- Ozone^(1/3)
group <- (Solar.R < 200)
sig1 <- sm.sigma(x[ group, ], y[ group], ci = TRUE)
sig2 <- sm.sigma(x[!group, ], y[!group], ci = TRUE)
print(c(sig1$estimate, sig1$ci))
print(c(sig2$estimate, sig2$ci))
print(sm.sigma(x[ group, ], y[ group], model = "constant", h = c(3, 5))$p)
print(sm.sigma(x[!group, ], y[!group], model = "constant", h = c(3, 5))$p)
print(sm.sigma2.compare(x[group, ], y[group], x[!group, ], y[!group]))
})
}
Run the code above in your browser using DataLab