Description Usage Arguments Value
This function minimizes
1/2 || w(y - θ) ||^2 + λ_||Dθ||_1
Where D is a trendfiltering pendalty matrix.
This function borrows code heavily from the genlasso
package and
also returns a genlasso
object.
1 2 3 | trendfilter_weights(y, pos, wts = NULL, ord = 0, approx = FALSE,
maxsteps = 2000, minlam = 0, rtol = 1e-07, btol = 1e-07,
eps = 1e-04, verbose = FALSE)
|
y |
Vector of data. |
pos |
Vector of positions. |
wts |
Vector of weights |
ord |
Order of polynomial to fit. |
... |
See |
Returns a genlasso
object with additional elements weights
with the weights provided.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.