Description Usage Arguments Value Examples
Calculates adjusted L_1 and L_2 errors by predictor distributions for a linear model.
1 2 3 |
mdl |
a |
dat.train |
same as in |
dat.test |
same as in |
method |
same as in |
sigma |
same as in |
lambda |
same as in |
kernel_num |
same as in |
fold |
same as in |
stabilize |
same as in |
qstb |
same as in |
reps |
same as in |
conf.level |
same as in |
Adjusted and non-adjusted estimates of L_1 and L_2 errors are provided as matrix form. "L1" and "L2" indicate non-adjusted versions, "L1 adjusted by score" and "L2 adjusted by score" indicate adjusted versions by linear predictors distribution, "L1 adjusted by predictors" and "L2 adjusted by predictors" indicate adjusted versions by predictor distributions (multi-dimensionally). For confidence intervals, "Percentile" indicates a confidence interval by percentile method and "Approx" indicates approximated versions by Normal distribution.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(100)
# generating development data
n0 = 100
Z = cbind(rbeta(n0, 3, 3), rbeta(n0, 3, 3))
Y = apply(Z, 1, function(xx) { rlnorm(1, sum(c(1, 1) * xx), 0.3) })
dat = data.frame(Za=Z[,1], Zb=Z[,2], Y=Y)
# the model to be evaluated
mdl = lm(Y~ Za + Zb, data=dat)
# generating validation dataset
n1 = 100
Z1 = cbind(rbeta(n0, 3.5, 2.5), rbeta(n0, 3.5, 2.5))
Y1 = apply(Z1, 1, function(xx) { rlnorm(1, sum(c(1, 1) * xx), 0.3) })
dat1 = data.frame(Za=Z1[,1], Zb=Z1[,2], Y=Y1)
# calculation of L1 and L2 for this model
appe.lm(mdl, dat, dat1, reps=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.