Description Usage Arguments Value Author(s) See Also Examples
Find the fusion estimates of given y
. Start iteration with theta
and the tuning parameter lambda
.
1 | fusion_estimates(y, theta, lambda, max_iter = 100, eps = 1e-5)
|
y |
A vector of numbers. |
theta |
A vector of numbers that has the same length as |
lambda |
A positive number; the tuning parameter. |
max_iter |
A natural number; the maximum iteration. |
eps |
A positive number; |
A list:
theta
: Resulting fusion estimates.
phi
: Differences in theta
.
lambda
: A specified lambda
when running the function.
iter
: The number of iterations.
costs
: Collection of costs at each iteration.
Junkyu Park
Dealing with a non-separable penalty
1 2 3 4 5 6 7 8 9 | set.seed(1024)
n <- 1000
t <- 1:n
f <- function(t) {t / 250 - .5}
g <- function(t) {-(.25 / 449) * t + 250 / 449}
true_theta <- c(rep(0, 249), f(250:500), rep(.75, 50), g(551:1000))
y <- true_theta + rnorm(1000, 0, 0.1)
start <- rep(.5, n)
result <- fusion_estimates(y, theta = Start, lambda = 1, max_iter = 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.