Description Usage Arguments Details Value Note References Examples

Constrained inference for linear fixed or mixed effects models using distribution-free bootstrap methodology

1 2 3 |

`formula` |
a formula expression. The constrained effect must come before any unconstrained covariates on the right-hand side of the expression. The constrained effect should be an ordered factor. |

`data` |
data frame containing the variables in the model. |

`gfix` |
optional vector of group levels for residual variances. Data should be sorted by this value. |

`constraints` |
optional list containing the constraints. See Details for further information. |

`tsf` |
function to calculate the test statistic. |

`tsf.ind` |
function to calculate the test statistic for individual constrats. See Details for further information. |

`mySolver` |
solver to use in isotonization (passed to |

`all_pair` |
logical, whether all pairwise comparisons should be considered (constraints will be ignored). |

`verbose` |
optional. Vector of 3 logicals. The first causes printing of iteration step, the second two are passed as the |

`...` |
space for additional arguments. |

If any random effects are included, the function computes MINQUE estimates of variance components. After,
`clme_em`

is run to obtain the observed values. If `nsim`

>0, a bootstrap test is performed
using `resid_boot`

.
For the argument `levels`

the first list element should be the column index (in `data`

) of the
constrained effect. The second element should be the true order of the levels.

The output of `clme`

is an object of the class `clme`

, which is list with elements:

`theta`

estimates of*theta*coefficients`theta`

estimates of*theta_0*coefficients under the null hypothesis`ssq`

estimate of residual variance(s),*sigma.i^2*.`tsq`

estimate of random effects variance component(s),*tau.i^2*.`cov.theta`

the unconstrained covariance matrix of*theta*`ts.glb`

test statistic for the global hypothesis.`ts.ind`

test statistics for each of the constraints.`mySolver`

the solver used for isotonization.`constraints`

list containing the constraints (`A`

) and the contrast for the global test (`B`

).`dframe`

data frame containing the variables in the model.`residuals`

matrix containing residuals. For mixed models three types of residuals are given.`random.effects`

estimates of random effects.`gfix`

group sample sizes for residual variances.`gran`

group sizes for random effect variance components.`gfix_group`

group names for residual variances.`formula`

the formula used in the model.`call`

the function call.`order`

list describing the specified or estimated constraints.`P1`

the number of constrained parameters.`nsim`

the number of bootstrap simulations used for inference.

The argument `constraints`

is a list containing the order restrictions. The elements are
`order`

, `node`

, `decreasing`

, `A`

, and `B`

, though not all are necessary.
The function can calculate the last two for default orders (simple, umbrella, or simple tree). For
default orders, `constraints`

should be a list containing any subset of `order`

,
`node`

, and `descending`

. See the figure below for a depiction of these values; the
pictured `node`

of the simple tree orders (middle column) is 1, and the `node`

for the
umbrella orders (right column) is 3. These may be vectors (e.g. order=('simple','umbrella') ).
If any of these three are missing, the function will test for all possible values of the missing
element(s), excluding simple tree.

For non-default orders, the elements `A`

and `B`

should be provided. `A`

is an
*r x 2* matrix (where r is the number of linear constraints, *0 < r*.
Each row should contain two indices, the first element is the index of the lesser coefficient, the
second element is the index of the greater coefficient. So a row of *(1,2)* corresponds
to the constraint *theta_1 <= theta_2*, and a row *(4,3)*
corresponds to the constraint *theta_4 <= theta_3*, etc. Element `B`

should hold similar contrasts, specifically those needed for calculating the Williams' type test
statistic (`B`

is only needed if `tsf=w.stat`

)
The argument `tsf`

is a function to calculate the desired test statistic. The default function
calculates likelihood ratio type test statistic. A Williams type test statistic, which is the maximum
of the test statistic over the constraints in `constraints\$B`

, is also available, and custom
functions may be defined. See `w.stat`

for details.
By default, homogeneity of variances is assumed for residuals (e.g., `gfix`

does not define groups)
and for each random effect.
Some values can be passed to `clme`

that are not used in this function. For instance,
`seed`

and `nsim`

can each be passed as an argument here, and `summary.clme`

will
use these values.

Jelsema, C. M. and Peddada, S. D. (2016).
CLME: An R Package for Linear Mixed Effects Models under Inequality Constraints.
*Journal of Statistical Software*, 75(1), 1-32. doi:10.18637/jss.v075.i01

1 2 3 4 5 |

jelsema/CLME documentation built on Aug. 20, 2017, 10:49 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.