Covobj and covset objects.
Create a set of covariates.
new_covobj(x, envir = parent.frame(), ...)
# S3 method for class 'covobj'
print(x, ...)
# S4 method for class 'covobj'
as.list(x, ...)
# S4 method for class 'covset'
as.list(x, ...)
# S3 method for class 'covset'
print(x, ...)
covset(..., envir = parent.frame())
rvset(...)
as.covset(x)
rvset
is an alias for covset
.
obj <- new_covobj(Y[0,80] ~ rnorm(20,50))
obj
#> Formula Y[0, 80] ~ rnorm(20, 50)
as.list(obj)
#> $vars
#> [1] "Y"
#>
#> $lower
#> expression(0)
#>
#> $upper
#> expression(80)
#>
#> $n
#> [1] 1
#>
#> $call
#> expression(rnorm(.n, 20, 50))
#>
#> $by
#> [1] ""
#>
#> $dist
#> [1] "rnorm"
#>
#> $formula
#> [1] "Y[0, 80] ~ rnorm(20, 50)"
#>
#> $envir
#> <environment: 0x55f8f2b24b88>
#>
a <- Y ~ runif(0,1)
b <- Z ~ rbeta(1,1)
set <- covset(a,b)
set
#> Formulae
#> Y ~ runif(0, 1)
#> Z ~ rbeta(1, 1)
as.list(set)
#> [[1]]
#> [[1]]$vars
#> [1] "Y"
#>
#> [[1]]$lower
#> expression(-Inf)
#>
#> [[1]]$upper
#> expression(Inf)
#>
#> [[1]]$n
#> [1] 1
#>
#> [[1]]$call
#> expression(runif(.n, 0, 1))
#>
#> [[1]]$by
#> [1] ""
#>
#> [[1]]$dist
#> [1] "runif"
#>
#> [[1]]$formula
#> [1] "Y ~ runif(0, 1)"
#>
#> [[1]]$envir
#> <environment: 0x55f8f2b24b88>
#>
#>
#> [[2]]
#> [[2]]$vars
#> [1] "Z"
#>
#> [[2]]$lower
#> expression(-Inf)
#>
#> [[2]]$upper
#> expression(Inf)
#>
#> [[2]]$n
#> [1] 1
#>
#> [[2]]$call
#> expression(rbeta(.n, 1, 1))
#>
#> [[2]]$by
#> [1] ""
#>
#> [[2]]$dist
#> [1] "rbeta"
#>
#> [[2]]$formula
#> [1] "Z ~ rbeta(1, 1)"
#>
#> [[2]]$envir
#> <environment: 0x55f8f2b24b88>
#>
#>