sim_cp | R Documentation |
Simulate data with measurment error from a change-point linear regression
sim_cp( n_sim = 50, min_x = 0, max_x = 2, alpha = 0, beta = c(1, 2), cp = 1, sigma = 0.1, x_err = 0.1, y_err = 0.1 )
n_sim |
Number of data points to simulate |
min_x |
Minimum x value |
max_x |
Maximum x value |
alpha |
Regression intercept |
beta |
Regression slope |
cp |
Change point |
sigma |
Nugget variation |
x_err |
x measurement error |
y_err |
y measurement error |
Simulated dataset with columns x, x_err, y, y_err
sim_cp(n_sim = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.