simulateUsedAvail: Simulate Used-Aavailable Data

Description Usage Arguments Value Author(s) Examples

View source: R/simulateUseAvail.R

Description

Simulates used-available data.

Usage

1
simulateUsedAvail(data, parms, n.used, m, link="logit")

Arguments

data

a matrix or data frame.

parms

coefficients corresponding to the columns of the design matrix derived as model.matrix(~., data).

n.used, m

number of used points (n.used) and number of available points for each (m).

link

character, the type of link function to be used.

Value

A used-available data frame.

Author(s)

Subhash Lele, Peter Solymos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

ResourceSelection documentation built on May 31, 2017, 4:51 a.m.