| Title: | Nonparametric Analysis of Longitudinal Data in Factorial Experiments |
|---|---|
| Description: | Provides nonparametric procedures for the analysis of longitudinal data in factorial experiments. The package implements hypothesis tests on marginal distribution functions and unweighted relative marginal effects. It supports arbitrary crossed factorial designs with longitudinal or repeated-measures factors, missing observations, dependent replicates, rank- and pseudo-rank-based inference, Wald-type and ANOVA-type statistics, multiple contrast tests, and simultaneous confidence intervals. |
| Authors: | Frank Konietschke [aut, cre], Kimihiro Noguchi [ctb] (Original package author), Mahbub Latif [ctb] (Original package author), Karthinathan Thangavelu [ctb] (Original package author), Yulia R. Gel [ctb] (Original package author), Edgar Brunner [ctb] |
| Maintainer: | Frank Konietschke <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.3.0 |
| Built: | 2026-10-22 08:29:22 UTC |
| Source: | https://github.com/frankkonietschke/nparld |
Measurements of alpha-amylase levels in saliva from healthy volunteers. The study illustrates a two-factor longitudinal design with two repeated measures factors.
amylaseamylase
A data frame with variables:
Alpha-amylase measurement.
First repeated-measures factor.
Second repeated-measures factor.
Subject identifier.
data(amylase) fit <- nparLD(resp ~ time1 * time2, data = amylase, subject = "subject", effect = "weighted", hypothesis = "H0F") fit # Dunnett-type contrasts for the levels of time2 fit <- nparLD(resp ~ time1 * time2, data = amylase, subject = "subject", hypothesis = "H0p", contrast = list("time2", "Dunnett"), Factor.Information = TRUE) fit plot(fit) plot(fit$MCTP)data(amylase) fit <- nparLD(resp ~ time1 * time2, data = amylase, subject = "subject", effect = "weighted", hypothesis = "H0F") fit # Dunnett-type contrasts for the levels of time2 fit <- nparLD(resp ~ time1 * time2, data = amylase, subject = "subject", hypothesis = "H0p", contrast = list("time2", "Dunnett"), Factor.Information = TRUE) fit plot(fit) plot(fit$MCTP)
BrdU incorporation in fibroblast cultures measured under four dose
conditions. For each culture and dose condition, three replicate measurements
are available. The data set is provided in long format and can be used to
illustrate dependent replicate measurements in nparLD().
brdubrdu
A data frame with 60 rows and 4 variables:
BrdU incorporation response.
Dose condition, with levels 0, 0.1, 1, and 10.
Culture identifier. This is the independent experimental unit.
Replicate identifier within each culture-dose condition.
The original variables were CultureNo, Replic, Dose, and Brdu.
In the package data set, the variables were renamed to culture,
replicate, dose, and resp for consistency with the examples.
## Not run: data(brdu) fit <- nparLD( resp ~ dose, data = brdu, subject = "culture", replicate = "replicate", hypothesis = "H0p", cell.weights = "subjects" ) fit ## End(Not run)## Not run: data(brdu) fit <- nparLD( resp ~ dose, data = brdu, subject = "culture", replicate = "replicate", hypothesis = "H0p", cell.weights = "subjects" ) fit ## End(Not run)
Measurements of distances between the center of the pituitary and the pterygomaxillary fissure in boys. The data illustrate a one-factor longitudinal design.
dentaldental
A data frame with variables:
Distance measurement in millimeters.
Age at measurement.
Subject identifier.
data(dental) dental$time <- factor(dental$time) ## Not run: fit <- nparLD(resp ~ time, data = dental, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ time, data = dental, subject = "subject", hypothesis = "H0p", contrast = list("time", "Tukey")) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(dental) dental$time <- factor(dental$time) ## Not run: fit <- nparLD(resp ~ time, data = dental, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ time, data = dental, subject = "subject", hypothesis = "H0p", contrast = list("time", "Tukey")) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Skin-temperature measurements from patients after hand surgery. The study compares treatment groups and includes two repeated-measures factors.
edemaedema
A data frame with variables:
Skin temperature measurement.
Hand factor.
Day factor.
Treatment group.
Subject identifier.
data(edema) ## Not run: fit <- nparLD(resp ~ group * time1 * time2, data = edema, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time1 * time2, data = edema, subject = "subject", hypothesis = "H0p", contrast = list("group", "Tukey"), Factor.Information = TRUE) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(edema) ## Not run: fit <- nparLD(resp ~ group * time1 * time2, data = edema, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time1 * time2, data = edema, subject = "subject", hypothesis = "H0p", contrast = list("group", "Tukey"), Factor.Information = TRUE) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Performs nonparametric inference for longitudinal or repeated-measures data from crossed factorial experiments. The function can be used to test hypotheses in marginal distribution functions or hypotheses in unweighted relative marginal effects. It allows crossed whole-plot and sub-plot factors, missing values, and dependent replicate measurements.
nparLD( formula, data, subject, replicate = NULL, cell.weights = c("subjects", "observations"), effect = c("unweighted", "weighted"), hypothesis = c("H0F", "H0p"), contrast = NULL, sci.method = c("fisher", "multi.t"), Factor.Information = FALSE, CI.method = c("logit", "normal"), alpha = 0.05, covariance = FALSE, perm.test = FALSE, B = 1000 )nparLD( formula, data, subject, replicate = NULL, cell.weights = c("subjects", "observations"), effect = c("unweighted", "weighted"), hypothesis = c("H0F", "H0p"), contrast = NULL, sci.method = c("fisher", "multi.t"), Factor.Information = FALSE, CI.method = c("logit", "normal"), alpha = 0.05, covariance = FALSE, perm.test = FALSE, B = 1000 )
formula |
A model formula of the form |
data |
A data frame containing the response, subject variable, design factors, and optionally a replicate variable. |
subject |
Character string specifying the subject identifier. |
replicate |
Optional character string specifying the replicate identifier. Replicates can be dependent within subject-condition cells. |
cell.weights |
Character string specifying how dependent replicates are
weighted. Use |
effect |
Character string specifying whether weighted or unweighted
relative effects are used. Use |
hypothesis |
Character string specifying the hypothesis type. Use
|
contrast |
Optional list specifying a factor or interaction term for
simultaneous inference. A one-element specification such as
|
sci.method |
Character string specifying the method for simultaneous
confidence intervals. Available choices are |
Factor.Information |
Logical. If |
CI.method |
Character string specifying the method for confidence intervals for
relative effects. Available choices are |
alpha |
Significance level for tests and confidence intervals. The
default is |
covariance |
Logical. If |
perm.test |
Logical. Should the paired two-time-point permutation test be used when applicable? This option is only available for paired designs with two time points. |
B |
Number of permutation samples used for the paired permutation test. |
The function provides rank- and pseudo-rank-based procedures for factorial
longitudinal data. The argument hypothesis = "H0F" specifies
hypotheses in marginal distribution functions. These hypotheses compare the
complete marginal distributions and are tested by rank-based procedures.
The argument hypothesis = "H0p" specifies hypotheses in unweighted
relative marginal effects. These effects describe the relative position of
each marginal distribution with respect to a common unweighted reference
distribution and are particularly useful for effect interpretation, multiple
contrast procedures, simultaneous confidence intervals, and graphical
summaries.
The contrast argument computes a multiple contrast test along with simultaneous
confidence intervals for the selected model terms. A one-element specification such as
list("time") uses the same hypothesis matrix as the global test procedures (Wald-
and ANOVA-type statistics) for the selected term. This
provides simultaneous inference for the components of the corresponding
global null hypothesis. A two-element specification such as
list("time", "Tukey") or list("time", "Dunnett") first forms
the marginal relative effects for the selected term and then applies the
requested multiple contrast procedure. Thus, list("time", "Tukey")
gives pairwise comparisons of the marginal time effects, whereas
list("time", "Dunnett") compares the marginal time effects with the
first time point. User-defined contrast vectors or matrices can be supplied
as the second list element.
Missing observations are allowed. Incomplete subject-condition cells
contribute where observations are available, and covariance estimation is
based on the independent subject-level units. Dependent replicate
measurements can be specified using the replicate argument. For
hypotheses in relative marginal effects, cell.weights = "subjects"
targets a typical subject-condition cell, whereas
cell.weights = "observations" targets a typical replicate observation.
For hypotheses in marginal distribution functions, dependent replicates are
handled by averaging rank or pseudo-rank scores within subject-condition
cells.
In case of bivariate data (e.g., before and after measurements), the function implements
a studentized permutation test for testing either hypothesis = "H0F" or
hypothesis = "H0p".
An object of class "nparld_fit". The object is a list containing the
results of the nonparametric longitudinal analysis. The main components are:
Design: character string describing the detected longitudinal
factorial design.
wholeplots: names of the whole-plot factors.
subplots: names of the subplot or repeated-measures factors.
text.ranks: character string describing the type of ranks used.
text.hypotheses: character string describing the type of
hypotheses tested.
N.info: information on the number of subjects and observations.
effects: a data frame with estimated relative effects. This
includes the factor-level combinations, the number of contributing
subjects and observations, the number of missing observations, the mean
rank or pseudo-rank score, the estimated relative effect, and its
standard error. For hypothesis = "H0p", confidence limits are also
returned.
factor.info: optional factor-specific relative effects,
standard errors, and confidence limits for main effects and interactions,
returned when Factor.Information = TRUE. These summaries can be
displayed with plot(fit, term = ...).
WTS: Wald-type test statistics, degrees of freedom, and
p-values for the tested main effects and interactions.
ATS: ANOVA-type test statistics, denominator degrees of
freedom, and p-values for the tested main effects and interactions.
MCTP: multiple contrast test results, returned when
contrast is specified. These include the selected factor or
interaction, the simultaneous confidence interval method, the global
multiple contrast test, local contrast estimates with standard errors,
simultaneous confidence limits, test statistics, p-values, degrees of
freedom, and the corresponding contrast matrix.
covariance.info: estimated covariance matrix used for the
selected hypothesis, returned when covariance = TRUE.
perm: permutation test results, returned when a permutation
test is requested and applicable.
hypothesis: the type of hypothesis tested, either "H0F"
for hypotheses in marginal distribution functions or "H0p" for
hypotheses in unweighted relative marginal effects.
CI.method: method used for confidence intervals.
.internal: internal objects used for computation and advanced
post-processing.
Some components may be NULL depending on the selected hypothesis,
contrast specification, and output options.
Akritas, M. G., & Brunner, E. (1997). A unified approach to rank tests for mixed models. Journal of Statistical Planning and Inference, 61(2), 249-277.
Brunner, E., Bathke, A.C., Konietschke, F. Rank and Pseudo-Rank Procedures for Independent Observations in Factorial Designs. Springer International Publishing, 2018.
Brunner, E., Domhof, S., & Langer, F. (2002). Nonparametric analysis of longitudinal data in factorial experiments. Wiley, New York
Brunner, E., Konietschke, F., Pauly, M., Puri, M. L. (2017). Rank-based procedures in factorial designs: Hypotheses about non-parametric treatment effects. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79(5), 1463-1485.
Domhof, S., Brunner, E., Osgood, D. W. (2002). Rank procedures for repeated measures with missing values. Sociological methods & research, 30(3), 367-393.
Konietschke, F., Bathke, A. C., Hothorn, L. A., & Brunner, E. (2010). Testing and estimation of purely nonparametric effects in repeated measures designs. Computational Statistics & Data Analysis, 54(8), 1895-1905.
Konietschke, F., Hothorn, L. A., Brunner, E. (2012). Rank-based multiple test procedures and simultaneous confidence intervals. Electronic Journal of Statistics, 6, 738-759.
Rubarth, K., Pauly, M., & Konietschke, F. (2022). Ranking procedures for repeated measures designs with missing data: estimation, testing and asymptotic theory. Statistical Methods in Medical Research, 31(1), 105-118.
Rubarth, K., Sattler, P., Zimmermann, H. G., & Konietschke, F. (2021). Estimation and testing of Wilcoxon–Mann–Whitney effects in factorial clustered data designs. Symmetry, 14(2), 244.
## One repeated-measures factor: dental data data(dental) fit_dental <- nparLD( resp ~ time, data = dental, subject = "subject", hypothesis = "H0p" ) fit_dental ## Crossed factorial longitudinal design: shoulder data data(shoulder) ## Not run: fit_shoulder <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p" ) fit_shoulder ## End(Not run) ## Multiple contrast procedure for an interaction ## Not run: fit_contrast <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", contrast = list("group1:time") ) fit_contrast$MCTP print(fit_contrast$MCTP, show.matrix = TRUE) ## End(Not run) ## Missing response values ## Not run: dat_miss <- dental dat_miss$resp[c(2, 7, 12)] <- NA fit_miss <- nparLD( resp ~ time, data = dat_miss, subject = "subject", hypothesis = "H0p" ) fit_miss ## End(Not run) ## Dependent replicate measurements: BrdU data data(brdu) ## Not run: fit_brdu <- nparLD( resp ~ dose, data = brdu, subject = "culture", replicate = "replicate", hypothesis = "H0p", cell.weights = "subjects" ) fit_brdu ## End(Not run) ## Not run: ## Graphical displays plot(fit_dental) plot(fit_shoulder) plot(fit_contrast$MCTP) ## End(Not run)## One repeated-measures factor: dental data data(dental) fit_dental <- nparLD( resp ~ time, data = dental, subject = "subject", hypothesis = "H0p" ) fit_dental ## Crossed factorial longitudinal design: shoulder data data(shoulder) ## Not run: fit_shoulder <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p" ) fit_shoulder ## End(Not run) ## Multiple contrast procedure for an interaction ## Not run: fit_contrast <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", contrast = list("group1:time") ) fit_contrast$MCTP print(fit_contrast$MCTP, show.matrix = TRUE) ## End(Not run) ## Missing response values ## Not run: dat_miss <- dental dat_miss$resp[c(2, 7, 12)] <- NA fit_miss <- nparLD( resp ~ time, data = dat_miss, subject = "subject", hypothesis = "H0p" ) fit_miss ## End(Not run) ## Dependent replicate measurements: BrdU data data(brdu) ## Not run: fit_brdu <- nparLD( resp ~ dose, data = brdu, subject = "culture", replicate = "replicate", hypothesis = "H0p", cell.weights = "subjects" ) fit_brdu ## End(Not run) ## Not run: ## Graphical displays plot(fit_dental) plot(fit_shoulder) plot(fit_contrast$MCTP) ## End(Not run)
Clinical Global Impression scores from patients with panic disorder and agoraphobia. The data illustrate a one-factor longitudinal design with ordinal responses.
panicpanic
A data frame with variables:
Clinical Global Impression score.
Visit or week of assessment.
Patient identifier.
data(panic) ## Not run: fit <- nparLD(resp ~ time, data = panic, subject = "subject", hypothesis = "H0F", contrast =list("time", "Dunnett")) fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ time, data = panic, subject = "subject", hypothesis = "H0p", contrast = list("time", "Dunnett")) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(panic) ## Not run: fit <- nparLD(resp ~ time, data = panic, subject = "subject", hypothesis = "H0F", contrast =list("time", "Dunnett")) fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ time, data = panic, subject = "subject", hypothesis = "H0p", contrast = list("time", "Dunnett")) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Panic and agoraphobia scores from patients with panic disorder, with or without agoraphobia. The data illustrate a factorial longitudinal design with one whole-plot factor and one repeated-measures factor.
panic2panic2
A data frame with variables:
Panic and agoraphobia score.
Visit or week of assessment.
Agoraphobia group.
Patient identifier.
data(panic2) ## Not run: fit <- nparLD(resp ~ group * time, data = panic2, subject = "subject", hypothesis = "H0F", effect="unweighted") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = panic2, subject = "subject", hypothesis = "H0p", contrast = list("group:time"), Factor.Information = TRUE, covariance=TRUE) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(panic2) ## Not run: fit <- nparLD(resp ~ group * time, data = panic2, subject = "subject", hypothesis = "H0F", effect="unweighted") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = panic2, subject = "subject", hypothesis = "H0p", contrast = list("group:time"), Factor.Information = TRUE, covariance=TRUE) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Plasma-renin activity measurements from a randomized study of healthy non-smokers. The data illustrate a factorial longitudinal design with one whole-plot factor and one repeated-measures factor.
plasmaplasma
A data frame with variables:
Plasma-renin activity measurement.
Measurement time.
Drug group.
Subject identifier.
data(plasma) ## Not run: fit <- nparLD(resp ~ group * time, data = plasma, subject = "subject", hypothesis = "H0F", effect="weighted") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = plasma, subject = "subject", hypothesis = "H0p", contrast = list("group", "Tukey")) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(plasma) ## Not run: fit <- nparLD(resp ~ group * time, data = plasma, subject = "subject", hypothesis = "H0F", effect="weighted") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = plasma, subject = "subject", hypothesis = "H0p", contrast = list("group", "Tukey")) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Displays graphical summaries of estimated relative effects from an
nparLD() fit. By default, the method plots the cell-level relative
effects stored in x$effects. If term is supplied, it plots
factor-specific relative effects and confidence intervals for selected main
effects or interactions. Term-specific plots require that the model was fitted
with Factor.Information = TRUE.
## S3 method for class 'nparld_fit' plot( x, term = NULL, xlab = NULL, ylab = "Relative effect", main = NULL, legend.title = NULL, ref.line = 0.5, ref.lty = "dashed", ref.col = "grey40", ... )## S3 method for class 'nparld_fit' plot( x, term = NULL, xlab = NULL, ylab = "Relative effect", main = NULL, legend.title = NULL, ref.line = 0.5, ref.lty = "dashed", ref.col = "grey40", ... )
x |
An object of class |
term |
Optional character vector specifying one or more model terms for
which factor-specific relative effects and confidence intervals should be
plotted. The requested terms require |
xlab |
Optional x-axis label. |
ylab |
Optional y-axis label. The default is |
main |
Optional plot title. |
legend.title |
Optional legend title. |
ref.line |
Optional horizontal reference line. The default is |
ref.lty |
Line type for the reference line. |
ref.col |
Colour of the reference line. |
... |
Further arguments. |
The default plot displays the estimated cell-level relative effects. If
term is supplied, the plot displays factor-specific relative effects
and confidence intervals for the selected main effects or interactions. This
requires that the model was fitted with Factor.Information = TRUE.
The horizontal reference line at 0.5 indicates no tendency relative to the
reference distribution. Values above 0.5 indicate a tendency toward larger
responses, whereas values below 0.5 indicate a tendency toward smaller
responses.
data(shoulder) fit <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", Factor.Information = TRUE ) ## Cell-level relative effects plot(fit) ## Factor-specific relative effects and confidence intervals plot(fit, term = "time") plot(fit, term = "group1:time")data(shoulder) fit <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", Factor.Information = TRUE ) ## Cell-level relative effects plot(fit) ## Factor-specific relative effects and confidence intervals plot(fit, term = "time") plot(fit, term = "group1:time")
Displays simultaneous confidence intervals for local contrasts from a multiple contrast test procedure. The plot shows the contrast estimates together with their simultaneous confidence limits and a vertical reference line at zero. Intervals excluding zero are highlighted by default.
## S3 method for class 'nparld_mctp' plot( x, xlab = "Contrast effect", ylab = "", main = NULL, ref.line = 0, ref.lty = 2, ref.col = "gray50", pch = 19, lwd = 2, col = NULL, ... )## S3 method for class 'nparld_mctp' plot( x, xlab = "Contrast effect", ylab = "", main = NULL, ref.line = 0, ref.lty = 2, ref.col = "gray50", pch = 19, lwd = 2, col = NULL, ... )
x |
An object of class |
xlab |
Label for the x-axis. The default is |
ylab |
Label for the y-axis. The default is an empty label. |
main |
Optional plot title. |
ref.line |
Optional vertical reference line. The default is |
ref.lty |
Line type for the reference line. |
ref.col |
Colour of the reference line. |
pch |
Plotting character. |
lwd |
Line width. |
col |
Optional colors for confidence intervals and point estimates. If
|
... |
Further graphical arguments. |
Displays simultaneous confidence intervals for the local contrast results returned by the multiple contrast test procedure. The vertical reference line at zero indicates the null value for contrast effects.
data(shoulder) fit <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", contrast = list("time", "Dunnett") ) plot(fit$MCTP)data(shoulder) fit <- nparLD( resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", contrast = list("time", "Dunnett") ) plot(fit$MCTP)
Displays the estimated covariance matrix of the relative effect estimator.
## S3 method for class 'nparld_covarianceinfo' print(x, digits = 4, ...)## S3 method for class 'nparld_covarianceinfo' print(x, digits = 4, ...)
x |
An object of class |
digits |
Number of digits used for printing numerical results. |
... |
Further arguments. |
The printed matrix is the estimated covariance matrix used for the selected
hypothesis. It is returned when covariance = TRUE.
Prints factor-specific relative effects, standard errors, and confidence
limits for the main effects and interactions of an nparLD() fit.
Factor information is returned when the model is fitted with
Factor.Information = TRUE and can also be displayed graphically with
plot(fit, term = ...).
## S3 method for class 'nparld_factorinfo' print(x, digits = 4, ...)## S3 method for class 'nparld_factorinfo' print(x, digits = 4, ...)
x |
An object of class |
digits |
Number of digits used for printing numerical results. |
... |
Further arguments. |
Factor information consists of term-specific relative effects, standard
errors, and confidence limits for main effects and interactions. These
summaries are returned when Factor.Information = TRUE and can be
visualized with plot(fit, term = ...).
Prints the main results of a fitted nparLD() model, including the
detected design, hypothesis type, ranking method, estimated relative effects,
and global WTS and ATS results. Optional components such as factor-specific
information, multiple contrast results, covariance matrices, and permutation
tests are displayed when available.
## S3 method for class 'nparld_fit' print(x, digits = 4, ...)## S3 method for class 'nparld_fit' print(x, digits = 4, ...)
x |
An object of class |
digits |
Number of digits used for printed numerical results. |
... |
Further arguments. |
The print method displays the detected design, sample size information, hypothesis type, ranking method, estimated relative effects, and global WTS and ATS results. Optional components are printed when available, including factor-specific information, multiple contrast results, covariance matrices, and permutation test results.
Prints the global and local results of a multiple contrast test procedure.
The local results include contrast estimates, standard errors, simultaneous
confidence limits, test statistics, adjusted p-values, and degrees of freedom.
The contrast matrix can optionally be displayed with
show.matrix = TRUE.
## S3 method for class 'nparld_mctp' print(x, digits = 4, show.matrix = FALSE, ...)## S3 method for class 'nparld_mctp' print(x, digits = 4, show.matrix = FALSE, ...)
x |
An object of class |
digits |
Number of digits used for printing numerical results. |
show.matrix |
Logical. If |
... |
Further arguments. |
The method prints the global multiple contrast test and the local contrast
results, including estimates, standard errors, simultaneous confidence
limits, test statistics, adjusted p-values, and degrees of freedom. The
contrast matrix is stored in x$Contrast.Matrix and is printed only
when show.matrix = TRUE.
Prints the main components of a summarized nparLD() fit, including
design information, hypothesis type, estimated relative effects, and global
WTS and ATS results. Optional components such as factor-specific information,
multiple contrast results, covariance matrices, and permutation tests are
displayed when available.
## S3 method for class 'summary.nparld_fit' print(x, digits = 4, ...)## S3 method for class 'summary.nparld_fit' print(x, digits = 4, ...)
x |
An object of class |
digits |
Number of digits used for printing numerical results. |
... |
Further arguments. |
Body-weight measurements from rats observed over a five-week period. The data illustrate longitudinal growth curves in several treatment groups.
ratrat
A data frame with variables:
Body weight in grams.
Week of measurement.
Treatment group.
Rat identifier.
## Not run: data(rat) fit <- nparLD(resp ~ group * time, data = rat, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = rat, subject = "subject", hypothesis = "H0p", contrast = list("group:time")) fit plot(fit) plot(fit$MCTP) ## End(Not run)## Not run: data(rat) fit <- nparLD(resp ~ group * time, data = rat, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = rat, subject = "subject", hypothesis = "H0p", contrast = list("group:time")) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Ordinal health-status measurements from patients with a respiratory disorder. The data include study center, treatment group, and repeated visits.
respirationrespiration
A data frame with variables:
Ordinal health-status response.
Visit number.
Study center.
Treatment group.
Patient identifier.
## Not run: data(respiration) fit <- nparLD(resp ~ center * treatment * time, data = respiration, subject = "patient", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ center * treatment * time, data = respiration, subject = "patient", hypothesis = "H0p", contrast = list("treatment", "Tukey")) fit plot(fit) plot(fit$MCTP) ## End(Not run)## Not run: data(respiration) fit <- nparLD(resp ~ center * treatment * time, data = respiration, subject = "patient", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ center * treatment * time, data = respiration, subject = "patient", hypothesis = "H0p", contrast = list("treatment", "Tukey")) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Shoulder pain scores from patients after laparoscopic abdominal surgery. The study includes treatment group, gender group, and repeated pain measurements.
shouldershoulder
A data frame with variables:
Shoulder pain score.
Measurement occasion.
Treatment group.
Gender group.
Patient identifier.
data(shoulder) ## Not run: fit <- nparLD(resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", contrast = list("group1:time"), Factor.Information=TRUE) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(shoulder) ## Not run: fit <- nparLD(resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group1 * group2 * time, data = shoulder, subject = "subject", hypothesis = "H0p", contrast = list("group1:time"), Factor.Information=TRUE) fit plot(fit) plot(fit$MCTP) ## End(Not run)
Extracts the main components of a fitted nparLD() object into a
structured summary object. The summary is useful for inspecting, printing, or
programmatically accessing the main results without working directly with all
internal components of the fitted object.
## S3 method for class 'nparld_fit' summary(object, ...)## S3 method for class 'nparld_fit' summary(object, ...)
object |
An object of class |
... |
Further arguments passed to or from other methods. |
The summary method returns a structured list containing the main components
of the fitted object. In contrast to print(), which is mainly intended
for console display, summary() is useful for storing or extracting the
main results programmatically.
An object of class "summary.nparld_fit" containing selected
components of the fitted model.
Repeated vitality scores of treetops from three experimental areas. The data illustrate an ordinal longitudinal response in several groups.
treetree
A data frame with variables:
Vitality score.
Year or measurement occasion.
Experimental area.
Tree identifier.
data(tree) ## Not run: fit <- nparLD(resp ~ group * time, data = tree, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = tree, subject = "subject", hypothesis = "H0p", contrast = list("group:time")) fit plot(fit) plot(fit$MCTP) ## End(Not run)data(tree) ## Not run: fit <- nparLD(resp ~ group * time, data = tree, subject = "subject", hypothesis = "H0F") fit ## End(Not run) ## Not run: fit <- nparLD(resp ~ group * time, data = tree, subject = "subject", hypothesis = "H0p", contrast = list("group:time")) fit plot(fit) plot(fit$MCTP) ## End(Not run)