トップ
新規
一覧
単語検索
最終更新
ヘルプ
ログイン
アールメカブ
R_tilde
をテンプレートにして作成
開始行:
[[Rの備忘録]]
[[Lattice Multivariate Data Visualization with R:http://w...
form <- ~ boxcox.trans(gcsescore, p) | gender
という自分では使ったことのないコードがある.ただし,ここ...
boxcox.trans <- function(x, lambda) {
if (lambda == 0) log(x) else (x^lambda - 1) / lambda
}
data(Chem97, package = "mlmRev")
trellis.device(pdf, file = "Chem97BoxCox.pdf",
width = 8, height = 6)
for (p in seq(0, 3, by = 0.5)) {
plot(qqmath(~boxcox.trans(gcsescore, p) | gender,
data = Chem97,
groups = score, f.value = ppoints(100),
main = as.expression(substitute(lambda == v,
list(v = p)))))
}
dev.off()
# 以下は動作しない
form <- ~ boxcox.trans(gcsescore, p) | gender
qqboxcox <- function(lambda) {
for (p in lambda)
plot(qqmath(form, data = Chem97,
groups = score, f.value = ppoints(100),
main = as.expression(substitute(lambda == v,
list(v = p))...
}
qqboxcox(lambda = seq(0, 3, by = 0.5))
終了行:
[[Rの備忘録]]
[[Lattice Multivariate Data Visualization with R:http://w...
form <- ~ boxcox.trans(gcsescore, p) | gender
という自分では使ったことのないコードがある.ただし,ここ...
boxcox.trans <- function(x, lambda) {
if (lambda == 0) log(x) else (x^lambda - 1) / lambda
}
data(Chem97, package = "mlmRev")
trellis.device(pdf, file = "Chem97BoxCox.pdf",
width = 8, height = 6)
for (p in seq(0, 3, by = 0.5)) {
plot(qqmath(~boxcox.trans(gcsescore, p) | gender,
data = Chem97,
groups = score, f.value = ppoints(100),
main = as.expression(substitute(lambda == v,
list(v = p)))))
}
dev.off()
# 以下は動作しない
form <- ~ boxcox.trans(gcsescore, p) | gender
qqboxcox <- function(lambda) {
for (p in lambda)
plot(qqmath(form, data = Chem97,
groups = score, f.value = ppoints(100),
main = as.expression(substitute(lambda == v,
list(v = p))...
}
qqboxcox(lambda = seq(0, 3, by = 0.5))
ページ名: