Description Usage Arguments Details Value See Also Examples
Check the symmetry condition for a PIM
1 2 3 4 5 6 | pimsym(formula, data, link = c("logit", "identity", "probit", "inverse",
"1/mu^2", "log"), blocking.variables = character(), leftsuffix = "_L",
rightsuffix = "_R", interpretation = c("difference", "regular",
"marginal", "symmetric"), na.action = na.fail, lhs = c("PO", "<", "<="),
verbosity = 0, interactions.difference = (interpretation != "marginal"),
threshold = 1e-06)
|
formula |
Original formula |
data |
Context where the formula |
link |
Name of the link function (defaults to |
blocking.variables |
Character vector holding column names that hold blocking variables. |
leftsuffix, rightsuffix |
Suffixes that will be added to the 'left' and 'right' observation's column name in the pseudo-observation. Note: no checking is done that these suffixes are safe, so the wrong suffixes may lead to unexpected behaviour. |
interpretation |
If |
na.action |
Defaults to |
lhs |
|
verbosity |
The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output) |
interactions.difference |
If |
threshold |
When checking the symmetry condition, how much digression is allowed. |
This check is implemented by taking a random set of coefficients (from
uniform distributions over ]-0.5,0.5[
) and comparing the predicted
probabilities based on them. So: not a formal check, though the error should
be ignorable.
Be aware that for sizeable datasets, this check may take quite some time and (temporarily) use a lot of memory.
Note that the same check is performed by pim.fit.prep
(and thus by
pim
) when check.symmetric=TRUE
.
TRUE
if the symmetry condition appears to be fulfilled.
estimator.nleqslv
varianceestimator.sandwich
1 2 3 4 5 6 7 8 9 | set.seed(1)
iris$out<-factor(sample(2, nrow(iris), replace=TRUE))
iris$xord<-as.ordered(iris$Species)
pima<-pim(out~Sepal.Length, data=iris, link="logit", interpretation="regular")
pimb<-pim(out~I((R(Sepal.Length) - L(Sepal.Length))/sqrt(R(Sepal.Length) * L(Sepal.Length)) ), data=iris,
link="logit", interpretation="regular", extra.nicenames=data.frame(
org="I((R(Sepal.Length) - L(Sepal.Length))/sqrt(R(Sepal.Length) * L(Sepal.Length)) )",
nice="Sepal.Length.WDiff", stringsAsFactors=FALSE))
pimc<-pim(out~O(xord), data=iris, link="logit", interpretation="regular")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.