sim_data | R Documentation |

Simulate data to use with the dlim package. There are different effect modification scenarios to choose for simulation.

```
sim_data(
x,
L = NULL,
modifiers,
noise = 1,
type = 2,
SNR,
ncovariates = 0,
gamma = 1
)
```

`x` |
a time series vector of length |

`L` |
a vector of length 1 containing the number of lag terms. This is required if |

`modifiers` |
vector of length |

`noise` |
a vector of length 1 containing the standard deviation for a normal distribution with mean 0 used to add noise to the simulated response values. Must proivde if |

`type` |
a vector containing the number 1, 2, 3, or 4 for simulation modification type: none, linear, non-linear shift, non-linear shift with linear scale (class " |

`SNR` |
The signal-to-noise ratio. If |

`ncovariates` |
number of covariates to add to the model, numeric vector of length 1. |

`gamma` |
True coefficient for the main effect of the modifier (class " |

This returns a list of 8 items:

`x` |
a lagged exposure matrix. If |

`L` |
a numeric vector of length 1 containing the number of lag terms (class " |

`modifiers` |
the |

`y` |
a numeric vector of length |

`betas` |
a matrix containing true coefficients for each lag/modifier combination, with each row representing a lag and each column a modifier (class " |

`betas_cumul` |
a numeric vector of length |

`Z` |
covariates (class " |

`gammas` |
true coefficients for the covariates (class " |

sim_dlim

Type `vignette('dlimOverview')`

for a detailed description.

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.