# NOT RUN {
par(mfrow = c(4, 1))
##################################################
# Example 1 - no merging happends between 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 = '1. If windows do not intersect, then wont merge! (l=10, k=5)'
)
##################################################
# 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 = '2. If windows intersect, then merge! (l=15, k=5)'
)
##################################################
# Example 3.1 - 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 = '3.1 If windows intersect with small k, then partially merge! (l=12, k=1)'
)
##################################################
# Example 3.2 - 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 = '3.2 If windows intersect with small k, then partially merge! (l=12, k=0.1)'
)
# }
Run the code above in your browser using DataLab