Learn R Programming

lctools (version 0.2-10)

random.test.data: Radmom data generator

Description

Generates datasets with random data for modelling including a dependent variable, independent variables and X,Y coordinates.

Usage

random.test.data(nrows = 10, ncols = 10, vars.no = 3, dep.var.dis = "normal", 
                xycoords = TRUE)

Value

a dataframe

Arguments

nrows

an integer referring to the number of rows for a regular grid

ncols

an integer referring to the number of columns for a regular grid

vars.no

an integer referring to the number of independent variables

dep.var.dis

a character referring to the distribution of the dependent variable. Options are "normal" (default), "poisson", and "zip"

xycoords

a logical value indicating whether X,Y coordinates will be created (default) or not.

Author

Stamatis Kalogirou <stamatis.science@gmail.com>

Details

The creation of a random dataset was necessary here to provide examples to some functions. However, random datasets may be used in simulation studies.

Examples

Run this code
RDF <- random.test.data(12,12,3,"poisson")

Run the code above in your browser using DataLab