Description Usage Arguments Details Author(s) Examples
Simulation of a piecewise relationship.
The function has been only implemented for convenience of simulations and R examples.
1 |
n |
Number of simulated data points |
states |
Number of states for the model |
sigma |
Noise |
x |
Segmented values. |
To be written...
Gwenael G.R. Leday g.g.r.leday@vu.nl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Simulate 1-state model
sim <- plrs.sim(n=80, states=1, sigma=0.5)
model <- plrs(expr=sim$expr, cghseg=sim$seg, cghcall=sim$cal)
plot(model)
# Simulate 2-state model
sim <- plrs.sim(n=80, states=2, sigma=0.5)
model <- plrs(expr=sim$expr, cghseg=sim$seg, cghcall=sim$cal)
plot(model)
# Simulate 3-state model
sim <- plrs.sim(n=90, states=3, sigma=0.5)
model <- plrs(expr=sim$expr, cghseg=sim$seg, cghcall=sim$cal)
plot(model)
# Simulate 4-state model
sim <- plrs.sim(n=80, states=4, sigma=0.5)
model <- plrs(expr=sim$expr, cghseg=sim$seg, cghcall=sim$cal)
plot(model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.