vector of length 4, giving the mean of each variable.
mysigma
variance-covariance matrix of multivariate normal distribution from which x1-x4 are to be drawn.
residsd
residual standard deviation.
x2binary
if TRUE, x2 is converted to a binary factor variable (1, 2) with probability equal
to the logistic of the underlying normally distributed variable.
Value
Data frame with 5 columns:
y
continuous, generated by
y = x1 + x2 + x3 + normal error if x2 is continuous,
or
y = x1 + x2 + x3 - 1 + normal error if x2 is a factor with values 1 or 2
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(CALIBERrfimpute)
Loading required package: mice
Loading required package: Rcpp
mice 2.25 2015-11-09
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CALIBERrfimpute/simdata.Rd_%03d_medium.png", width=480, height=480)
> ### Name: simdata
> ### Title: Simulate multivariate data for testing
> ### Aliases: simdata
>
> ### ** Examples
>
> set.seed(1)
> simdata(n=4, x2binary=TRUE)
y x1 x2 x3 x4
1 -0.06399616 -1.23307320 2 -0.6521442 1.6141842
2 1.00822173 -0.05167026 1 0.4659907 0.5421826
3 2.87886825 0.43816687 1 1.5217240 0.2808691
4 0.79129101 -0.72510640 1 0.7342611 0.1820001
> # y x1 x2 x3 x4
> # 1 -0.06399616 -1.23307320 2 -0.6521442 1.6141842
> # 2 1.00822173 -0.05167026 1 0.4659907 0.5421826
> # 3 2.87886825 0.43816687 1 1.5217240 0.2808691
> # 4 0.79129101 -0.72510640 1 0.7342611 0.1820001
>
>
>
>
>
> dev.off()
null device
1
>