View source: R/simulateUseAvail.R
simulateUsedAvail | R Documentation |
Simulates used-available data.
simulateUsedAvail(data, parms, n.used, m, link="logit")
data |
a matrix or data frame. |
parms |
coefficients corresponding to the columns of the design matrix
derived as |
n.used, m |
number of used points ( |
link |
character, the type of link function to be used. |
A used-available data frame.
Subhash Lele, Peter Solymos
n.used <- 1000
m <- 10
n <- n.used * m
set.seed(1234)
x <- data.frame(x1=rnorm(n), x2=runif(n))
cfs <- c(1.5,-1,0.5)
dat1 <- simulateUsedAvail(x, cfs, n.used, m, link="log")
str(dat1)
dat2 <- simulateUsedAvail(x, cfs, n.used, m, link="logit")
str(dat2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.