Description Usage Arguments Value Author(s) See Also Examples

This function computes the exponential weights (smooth windowing function) for different shapes (k) and bandwidth (l) and provides some plots

1 |

`t` |
Vector. a vector of positive continuous values |

`k` |
A single value for sharpness |

`l` |
A single value for bandwidth |

`m` |
Vector. The location of the modes on t (modes are the peak of the windows) |

`plot` |
Logical flag. Set to true shows a plot of the weights. |

`...` |
The parameters that can be passed to the plot() function |

A vector of weights

Hamed Haselimashhadi <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ```
par(mfrow = c(3, 1))
# Example 1 - no merging in windows
weight = expWeight(
t = 1:100 ,
k = 5 ,
l = 10 ,
m = c(25, 50, 75) ,
plot = TRUE ,
### Passed parameters to the plot function
type = 'l' ,
lty = 2 ,
lwd = 3 ,
main = 'If windows do not intersect, then wont merge!'
)
# Example 2 - merging in windows
weight = expWeight(
t = 1:100 ,
k = 5 ,
l = 15 ,
m = c(25, 50, 75) ,
plot = TRUE ,
### Passed parameters to the plot function
type = 'l' ,
lty = 2 ,
lwd = 3 ,
main = 'If windows intersect, then merge!'
)
# Example 3 - partial merging in windows
weight = expWeight(
t = 1:100 ,
k = 1 ,
l = 12 ,
m = c(25, 50, 75) ,
plot = TRUE ,
### Passed parameters to the plot function
type = 'l' ,
lty = 2 ,
lwd = 3 ,
main = 'If windows intersect with small k, then partially merge!'
)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.