- obj
A 'lme' fit returned by lme
or simply its call. See example below. This represents the linear mixed model
where the segmented relationship is added.
- seg.Z
A one-sided formula indicating the segmented variable, i.e. the quantitative variable having a segmented relationship with
the response. In longitudinal studies typically it is the time.
- psi
An optional starting value for the breakpoint. If missing a starting value is obtained via the nadir estimate of a quadratic fit.
When provided it may be a single numeric value or a vector of length equal to the number of clusters (i.e. subjects).
- z.psi
Optional. A one-sided formula meaning the sub-regression model for the changepoint parameter. Default to ~1
.
- x.diff
Optional. A one-sided formula meaning the sub-regression model for the difference-in-slopes parameter.
Default to ~1
for no covariate for the difference-in-slope parameter.
- npsi
Ignored. Currently only npsi=1
is allowed.
- fixed.psi
Ignored.
- control
A list returned by seg.control
, in particular display
, n.boot
for the bootstrap restarting.
- model
Ignored.
- random
A list, as the one supplied in random
of lme()
including the random effects. Default to NULL
,
meaning that the same random effect structure of the initial lme fit supplied in obj
should be used.
When specified, this list could include the variables 'G0
' and 'U
'.
G0
means random effects in the breakpoints and U
means random effects in the
slope-difference parameter. Assuming id
is the the cluster variable and x
the segmented variable, some examples are
random = list(id = pdDiag(~1 + x + U))
#ind. random eff. (changepoint fixed)
random = list(id = pdDiag(~1 + x + U + G0))
#ind. random eff. (in the changepoint too)
random = list(id=pdBlocked(list(pdSymm(~1+x), pdSymm(~U+G0-1))))
#block diagonal
- random.noG
Ignored.
- start.pd
An optional starting value for the variances of the random effects. It should be coherent with the
specification in random
.
- psi.link
The link function used to specify the sub-regression model for the breakpoint \(psi\).
The identity (default) assumes
$$\psi_i=\eta_i$$
while the logit link is
$$\psi_i=(m+M*exp(\eta_i))/(1+exp(\eta_i))$$
where m and M are the observed minimum and maximum of the segmented variable Z
.
In each case the `linear predictor' is \(\eta_i=\kappa_0+\kappa_1*z_i+k_i\), where z is
the covariate specified in z.psi
and the \(k_i\)s are the changepoint random effects
included by means of G0
in the random
argument.
- nq
Integer value to assess if the estimated breakpoint for the subject i can be considered 'reliable' or not. For each subject, \(\hat\psi\) is not considered reliable if
$$\hat{\psi}\le z_{(1+nq)} \; \mathrm{ and } \; \hat{\psi}\ge z_{(n_i-nq)} $$
where \(z_{(\cdot)}\) means the sorted values of the segmented variable. Note nq
just affects the logical vector attr(psi.i,"is.break")
where psi.i
is the component of the model fit including the subject-specific breakpoints. Default is nq=0
.
- adjust
A numerical (0 or 1) value. If adjust=1
at convergence and for each subject i
the estimated breakpoint assessed as unreliable (see argument nq
) is moved to the maximum of the covariate range (for the subject i). Thus for the subjects with 'unreliable' breakpoint, the corresponding fitted profile will be truly linear.
- start
An optional list including the starting values for the difference-in-slopes parameter, delta0 and delta,
and the changepoint parameter, kappa and kappa0. When provided, 'kappa0' overwrites 'psi'.
If provided, the components 'delta' and 'kappa' should be named vectors with length and names
matching length and names in x.diff
and z.psi
respectively. The component delta0
can be
a scalar or a vector with length equal to the number of clusters (subjects).
- data
the dataframe where the variables are stored. If missing, the dataframe of the "lme"
fit obj
is assumed.
- fixed.parms
An optional named vector representing the coefficients of the changepoint to be maintained fixed
during the estimation process. Allowed names are "G0" or any variable (in the dataframe) supposed to
affect the location of breakpoints.
For instance fixed.parms=c(G0=.3)
implies a fixed value for the changepoint.
Notice if you use the same variable in fixed.parms
and in z.psi
, for instance
fixed.parms=c(x2=.3)
and z.psi=~x2
, a warning is printed and the
coefficient "G.x2" is estimated to maximize the log likelihood given that fixed value. As an example, suppose the
unconstrained estimated coefficient for x2, say, in z.psi
is 0.5; if in a new call both fixed.parms=c(x2=.4)
and
z.psi=~x2
are included, the estimate of "G.x2" will be (approximately) 0.1.
Essentially, if you really want to fix the parameters in fixed.parms
, then
do not include the same covariates in z.psi
.
- ...
Ignored