Displaying 3 results from an estimated 3 matches for "lambdaf".
Did you mean:
lambda
2011 Dec 05
1
finding interpolated values along an empirical parametric curve
....Names =
c("lambda",
"log.det", "norm.beta"), class = "data.frame", row.names = c("0.000",
"0.005", "0.010", "0.020", "0.040", "0.080"))
clr <- c("black", rainbow(5, start=.6, end=.1))
lambdaf <- c(expression(~widehat(beta)^OLS), ".005", ".01", ".02",
".04", ".08")
op <- par(mar=c(4, 4, 1, 1) + 0.2, xpd=TRUE)
with(pd, {plot(norm.beta, log.det, type="b",
cex.lab=1.25, pch=16, cex=1.5, col=clr,
xlab='shrinkage:...
2011 Nov 29
2
format numbers without leading or trailing 0s
A simple question, but I can't find something to do what I want:
Given: a vector of numbers, like
lambda <- c(0, 0.005, 0.01, 0.02, 0.04, 0.08)
Desired: format them in minimal space for use as plot labels, ie,
without leading or tailing 0s. For this example:
lambdaf <- c("0", .005", ".01", ".02", ".04", ".08")
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street Web: http://www.datav...
2011 Aug 06
0
ridge regression - covariance matrices of ridge coefficients
...ames(X), colnames(X))
}
dimnames(coef) <- list(format(lambda), colnames(X))
result <- list(lambda=lambda, coef=coef, cov=cov, mse=mse,
scales=Xscale)
class(result) <- "ridge"
result
}
# Test:
> lambda <- c(0, 0.005, 0.01, 0.02, 0.04, 0.08)
> lambdaf <- c("", ".005", ".01", ".02", ".04", ".08")
> lridge <- ridge(longley.y, longley.X, lambda=lambda)
> lridge$coef
GNP Unemployed Armed.Forces Population Year GNP.deflator
0.000 -3.4471925 -1.827886 -0.69...