Description Usage Arguments Details Value Note Warning See Also Examples
This function allows you to create a pim.poset
environment
that can be added to a pim.environment
object. You can
use this function to create a custom poset, but in general it's safer
to use the relevant arguments of the pim
function.
That way more safety checks are carried out.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | new.pim.poset(compare, nobs, parent = parent.frame(), ...)
## S4 method for signature 'character,numeric'
new.pim.poset(compare, nobs, parent = parent.frame(), ...)
## S4 method for signature 'matrix,numeric'
new.pim.poset(compare, nobs, parent = parent.frame(), ...)
## S4 method for signature 'list,numeric'
new.pim.poset(compare, nobs, parent, comp.value = "custom", ...)
## S4 method for signature 'matrix,missing'
new.pim.poset(compare, nobs, parent = parent.frame(), ...)
## S4 method for signature 'list,missing'
new.pim.poset(compare, nobs, parent = parent.frame(), ...)
## S4 method for signature 'missing,numeric'
new.pim.poset(compare, nobs, parent = parent.frame(), ...)
|
compare |
A character value, matrix or list indicating how the
poset should be constructed. Defaults to the default value of
|
nobs |
An integer value determining the number of observations this poset is created for. If compare is not a character value, the number of observations |
parent |
An optional environment that serves as the parent for the
|
... |
arguments passed to other methods. |
comp.value |
a character value to be used as value for the compare slot of the object. Defaults to 'custom' and should be left at the default without a very good reason to change it. |
A poset (or pseudo observation set) in the context of probabilistic index models is a set of indices that determines which observations are compared with one another. It is used to construct the pseudo-observations on which the model is fitted. You can think of a poset as a "pseudo-observation set".
The most convenient way to use this function, is by specifying
a character value for the argument compare
. The value "unique"
creates a poset in such a way that only unique combinations of two
observations are used in the model. The value "all" creates all
possible L-R combinations between the observations.
If you want to define the poset yourself, you can pass either a matrix
or a list with 2 elements as value for the argument compare
.
Columns of the matrix or elements of the list should either be named
"L" and "R", or be unnamed. When unnamed, the function takes the first
column/element as the left poset, and the second column/element as
the right poset. If the (col)names are anything else but "L" and "R",
these names are ignored and the first column is seen as "L".
an pim.poset
object that can be used to
replace the poset in a pim environment.
You can omit the argument compare
if you supply a value for
nobs
. You can also omit the argument nobs
if you
provide a matrix or list as value for compare
. The function
will try to deduct the number of observations from the highest
index value present in the matrix/list
You can't omit both arguments together though, as the function needs at least some information on the number of observations the poset is designed for.
Changing the value of comp.value
by hand might result in
errors or a wrongly fitted model. The argument exists for internal
purposes and possible extensions later on, but should not be used.
add.poset
for more information on how to
adapt the poset of a pim.environment
object.
1 2 3 4 5 6 7 | mypos <- new.pim.poset('unique',n=10) # creates empty environment
ls(mypos)
# Using the created poset functions L and R
# Note this is purely as illustration, this makes no sense
# in the context of a pim analysis.
mypos$L(1:10)
mypos$R(1:10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.