buildsim.lm {simitation} | R Documentation |
Internal function for Simulation for Linear Regression Data
Description
This internal function is designed to generate data based on a linear regression model specified by the provided formula. It is not intended for direct usage by end-users.
Usage
buildsim.lm(dat, the.formula, the.variable, n, num.experiments = 1)
Arguments
dat |
A data.frame or data.table containing the variables referenced in the.formula. |
the.formula |
A character string specifying the linear regression function, e.g., "lm(0.5 * X + 1.2 * Y + N(0,2))". |
the.variable |
A character string naming the variable in the generated data. |
n |
An integer specifying the number of data points to generate for each experiment. |
num.experiments |
An integer specifying the number of experiments to simulate. Default is 1. |
Value
A data frame with simulated linear regression values based on the given formula.
[Package simitation version 0.0.7 Index]