Learn R Programming

simFrame (version 0.5.4)

accessors: Accessor and mutator functions for objects

Description

Get values of slots of objects via accessor functions and set values via mutator functions. If no mutator methods are available, the slots of the corresponding objects are not supposed to be changed by the user.

Usage

getAdd(x)

getAux(x) setAux(x, aux)

getCall(x, …)

getCollect(x) setCollect(x, collect)

getColnames(x) setColnames(x, colnames)

getContControl(x) setContControl(x, contControl)

getControl(x)

getDataControl(x)

getDesign(x) setDesign(x, design)

getDistribution(x) setDistribution(x, distribution)

getDots(x, …) setDots(x, dots, …)

# S4 method for TwoStageControl getDots(x, stage = NULL) # S4 method for TwoStageControl setDots(x, dots, stage = NULL)

getEpsilon(x) setEpsilon(x, epsilon)

getFun(x, …) setFun(x, fun, …)

# S4 method for TwoStageControl getFun(x, stage = NULL) # S4 method for TwoStageControl setFun(x, fun, stage = NULL)

getGrouping(x) setGrouping(x, grouping)

getIndices(x)

getIntoContamination(x) setIntoContamination(x, intoContamination)

getK(x) setK(x, k)

getLegend(x)

getNAControl(x) setNAControl(x, NAControl)

getNArate(x) setNArate(x, NArate)

getNr(x)

getNrep(x)

getProb(x, …) setProb(x, prob, …)

# S4 method for TwoStageControl getProb(x, stage = NULL) # S4 method for TwoStageControl setProb(x, prob, stage = NULL)

getSAE(x) setSAE(x, SAE)

getSampleControl(x)

getSeed(x)

getSize(x, …) setSize(x, size, …)

# S4 method for TwoStageControl getSize(x, stage = NULL) # S4 method for TwoStageControl setSize(x, size, stage = NULL)

getSplit(x)

getTarget(x) setTarget(x, target)

getValues(x)

Arguments

x

an object.

aux

a character string specifying an auxiliary variable (see "'>ContControl" and "'>NAControl").

collect

a logical indicating whether groups should be collected after sampling individuals or sampled directly (see "'>SampleControl").

colnames

a character vector specifying column names (see "'>DataControl").

contControl

an object of class "'>ContControl" (see "'>SimControl").

design

a character vector specifying columns to be used for stratification (see "'>SampleControl", "'>TwoStageControl" and "'>SimControl").

distribution

a function generating data (see "'>DataControl" and "'>DCARContControl").

dots

additional arguments to be passed to a function (see "'>DataControl", "'>DARContControl", "'>DCARContControl", "'>SampleControl", "'>TwoStageControl" and "'>SimControl").

epsilon

a numeric vector giving contamination levels (see "'>VirtualContControl").

fun

a function (see "'>DARContControl", "'>SampleControl", "'>TwoStageControl" and "'>SimControl").

grouping

a character string specifying a grouping variable (see "'>ContControl", "'>NAControl", "'>SampleControl" and "'>TwoStageControl").

intoContamination

a logical indicating whether missing values should also be inserted into contaminated observations (see "'>NAControl").

k

a single positive integer giving the number of samples to be set up (see "'>VirtualSampleControl").

NAControl

an object of class "'>NAControl" (see "'>SimControl").

NArate

a numeric vector or matrix giving missing value rates (see "'>VirtualNAControl").

prob

a numeric vector giving probability weights (see "'>SampleControl" and "'>TwoStageControl").

SAE

a logical indicating whether small area estimation will be used in the simulation experiment (see "'>SimControl").

size

a non-negative integer or a vector of non-negative integers (see "'>DataControl", "'>SampleControl" and "'>TwoStageControl").

stage

optional integer; for certain slots of "'>TwoStageControl", this allows to access or modify only the list component for the specified stage. Use 1 for the first stage and 2 for the second stage.

target

a character vector specifying target columns (see "'>VirtualContControl" and "'>VirtualNAControl").

only used to allow for the stage argument in accessor and mutator methods for "'>TwoStageControl". Otherwise no additional arguments are available.

Value

For accessor functions, the corresponding slot of x is returned.

For mutator functions, the corresponding slot of x is replaced.

Methods for function getAdd

signature(x = "SimResults")

Methods for functions getAux and setAux

signature(x = "ContControl")

signature(x = "NAControl")

Methods for function getCall

signature(x = "SampleSetup")

signature(x = "SimResults")

signature(x = "Strata")

Methods for functions getCollect and setCollect

signature(x = "SampleControl")

Methods for function getColnames

signature(x = "DataControl")

signature(x = "SimResults")

Methods for function setColnames

signature(x = "DataControl")

Methods for functions getContControl and setContControl

signature(x = "SimControl")

Methods for function getControl

signature(x = "SampleSetup")

signature(x = "SimResults")

Methods for function getDataControl

signature(x = "SimResults")

Methods for function getDesign

signature(x = "SampleControl")

signature(x = "TwoStageControl")

signature(x = "SimControl")

signature(x = "SimResults")

signature(x = "Strata")

Methods for function setDesign

signature(x = "SampleControl")

signature(x = "TwoStageControl")

signature(x = "SimControl")

Methods for functions getDistribution and setDistribution

signature(x = "DataControl")

signature(x = "DCARContControl")

Methods for functions getDots and setDots

signature(x = "DataControl")

signature(x = "DARContControl")

signature(x = "DCARContControl")

signature(x = "SampleControl")

signature(x = "TwoStageControl")

signature(x = "SimControl")

Methods for function getEpsilon

signature(x = "SimResults")

signature(x = "VirtualContControl")

Methods for function setEpsilon

signature(x = "VirtualContControl")

Methods for functions getFun and setFun

signature(x = "DARContControl")

signature(x = "SampleControl")

signature(x = "TwoStageControl")

signature(x = "SimControl")

Methods for functions getGrouping and setGrouping

signature(x = "ContControl")

signature(x = "NAControl")

signature(x = "SampleControl")

signature(x = "TwoStageControl")

Methods for function getIndices

signature(x = "SampleSetup")

Methods for functions getIntoContamination and setIntoContamination

signature(x = "NAControl")

Methods for functions getK and setK

signature(x = "VirtualSampleControl")

Methods for function getLegend

signature(x = "Strata")

Methods for functions getNAControl and setNAControl

signature(x = "SimControl")

Methods for function getNArate

signature(x = "SimResults")

signature(x = "VirtualNAControl")

Methods for function setNArate

signature(x = "VirtualNAControl")

Methods for function getNr

signature(x = "Strata")

Methods for function getNrep

signature(x = "SimResults")

Methods for function getProb

signature(x = "SampleControl")

signature(x = "TwoStageControl")

signature(x = "SampleSetup")

Methods for function setProb

signature(x = "SampleControl")

signature(x = "TwoStageControl")

Methods for functions getSAE and setSAE

signature(x = "SimControl")

Methods for function getSampleControl

signature(x = "SimResults")

Methods for function getSeed

signature(x = "SampleSetup")

signature(x = "SimResults")

Methods for function getSize

signature(x = "DataControl")

signature(x = "SampleControl")

signature(x = "TwoStageControl")

signature(x = "Strata")

signature(x = "SummarySampleSetup")

Methods for function setSize

signature(x = "DataControl")

signature(x = "SampleControl")

signature(x = "TwoStageControl")

Methods for function getSplit

signature(x = "Strata")

Methods for functions getTarget and setTarget

signature(x = "VirtualContControl")

signature(x = "VirtualNAControl")

Methods for function getValues

signature(x = "SimResults")

signature(x = "Strata")

References

Alfons, A., Templ, M. and Filzmoser, P. (2010) An Object-Oriented Framework for Statistical Simulation: The R Package simFrame. Journal of Statistical Software, 37(3), 1--36. 10.18637/jss.v037.i03.

Examples

Run this code
# NOT RUN {
nc <- NAControl(NArate = 0.05)
getNArate(nc)

setNArate(nc, c(0.01, 0.03, 0.05, 0.07, 0.09))
getNArate(nc)

# }
# NOT RUN {
<!-- % TODO: examples for "TwoStageControl" -->
# }

Run the code above in your browser using DataLab