Abstract
Spline (or piecewise) regression models have been used in the past to account for patterns in observed data that exhibit distinct phases. The changepoint or knot marking the shift from one phase to the other, in many applications, is an unknown parameter to be estimated. As an extension of this framework, this research considers modeling the relation between endogenous and exogenous latent variables with a spline regression model, where each latent variable is measured by multiple observed indicators. Consequently, the spline regression model is modified to include a measurement model that explicitly expresses the relation of the observed variables to the latent constructs. Maximum likelihood estimation of the model is developed and executed on educational data to illustrate the utility of the model.
Keywords
Introduction
Spline (or piecewise) 1 regression models have been used in the past to account for nonlinearity in observed data that exhibit distinct phases. The general theory of two-phase, piecewise models is reviewed by Seber and Wild (1989, chap. 9). These models are flexible because each segment can be specified to conform to a particular aspect of the overall response–predictor relation. A typical scenario might break the observed pattern into piecewise linear components with linear rates of change differing across ranges of the predictor. For example, the data graphed in the scatterplot in Figure 1 consist of 72 measurements on the age in months (x) and the weight/height ratio (y) of preschool boys. 2 Note that age ranges from 0.5 to 71.5 months in 1-month intervals.

Scatterplot of weight/height ratio (in lbs.) by age (in months) with generic fitted function of a linear–linear piecewise model.
In the first phase of development, weight/height ratio improves rapidly until about the eighth or ninth month, after which the ratio follows a linear trend distinct from the first phase, in which the ratio continues to grow, but just not as rapidly. A piecewise model suggested by these data is a segmented, linear–linear process with distinct pieces for the early and later ages. An examination of the plot shows that the changepoint, or knot, marks the shift from one phase to the other. 3 It is straightforward to consider different patterns such as quadratic–linear 4 or linear–exponential to allow a nonlinear trajectory in one segment and a steady-state condition in the other.
In other contexts, the situation may arise when there are more than two observed phases over the range of the predictor (Cudeck & Codd, 2012). In these situations, multiple knots would be necessary to account for the various transitions. Although the number of options can appear overwhelming, it is important to underscore that the functional form of each segment can be tailored to capture the interesting facets of the relation (Cudeck & Harring, 2010). One of the most interesting features of a piecewise model is the knot or changepoint. The knot, a parameter to be estimated in many applications, is the value of the predictor where the segments meet. Often the knot has special significance scientifically (see, e.g., Bacon & Watts, 1971) as it may signify some watershed event, treatment, intervention, or other important aspect fundamental to the bivariate relation. For instance, in the forthcoming empirical example in which students’ verbal reasoning depends on their verbal acuity, there is a verbal acuity proficiency threshold (e.g., knot) beyond which verbal reasoning increases more rapidly than before reaching the threshold. It is just this type of insight that makes piecewise models invaluable and more appropriate perhaps than traditional functions such as higher order polynomials, whose model parameters provide less direct information about interesting facets fundamental to the underlying behavioral process.
In instances when several observed indicators measuring the same latent construct are collected, the piecewise relation between latent criterion and predictor can be investigated within a general latent variable regression modeling framework. Latent variable models corresponding to their manifest variable counterparts have the distinct advantage that latent variables are by definition error-free and thus the models are not tainted by unaccounted measurement error. Conceptually, the jump from an observed to latent variable framework for piecewise regression models is fairly clear-cut. However, a general methodological problem exists to estimate such a model in practice. Like piecewise regression models for observed variables, even if the regression coefficients enter the function linearly, the unknown knot makes the entire system intrinsically nonlinear. For observed variables, this would suggest using an iterative procedure such as Newton’s method for nonlinear least squares estimation or a Newton–Raphson algorithm for maximum likelihood. In the context of latent variable regression, the inherent nonlinearity poses similar estimation challenges.
Although general nonlinear structural equation models are a very broad class (Wall & Amemiya, 2007), a considerable amount of attention in recent years has been devoted to polynomial models, including cross-product terms among the latent variables representing interactions. Piecewise latent variable regression models with an unknown knot are subsumed within this class. Because these models have at least one nonlinear coefficient corresponding to a latent variable, perhaps more than one, maximum likelihood estimation assuming a normal distribution for the exogenous predictor(s) is more difficult than in standard structural equation models that specify only linear relations (Klein & Muthén, 2007; Wall & Amemiya, 2000).
This article considers a piecewise regression model for investigating data that exhibit distinct phases. Most common applications of piecewise models center on a single observed response variable which changes in a systematic, but potentially different, manner across values of the observed predictor. The approach considered here treats two or more observed variables but with a latent variable structure. This is accomplished by augmenting the piecewise regression model with a measurement model to capture the relation between multiple indicators and their corresponding latent construct. Gaussian–Hermite quadrature is presented as a method for maximum likelihood estimation of the model. This approach has its liabilities, in particular, the slow speed to convergence as the number of dimensions of integration increases (Cudeck, Harring, & du Toit, 2009). In the current application, this deficit notwithstanding, because there are only two latent variables to integrate over, any impact to the computation time is thought to be negligible.
The remainder of the article adheres to the following outline. In the next section, the piecewise model will be explicated within a latent variable modeling framework. Estimation of the model will be subsequently discussed. Finally, an empirical data set will be used to demonstrate the utility of the model.
Piecewise Regression Model for Latent Variables
Given a p-dimensional vector of manifest variables
where in Equation (1),
From Equation (2), the intercept and slope of the first phase are β1 and β2, and those of the second phase are β3 and β4, respectively. Including the knot, γ, this structural model specifies five parameters. If it is presumed that the functions characterizing the two phases join at the changepoint, then the function values at γ are equal (i.e.,
resulting in a model with three linear coefficients,
The last term is the truncation operator, defined as zero or the positive value of the argument, depending on its sign:
As examples, (6.3 − 4)+ = 2.3, (1 − 0.9)+ = 0.1, but (−2)+ = 0 and (1 − 5)+ = 0.
Interestingly, the piecewise linear model in Equation (3) suggests a steady increasing rate in the first phase (β2), yet changes instantly at f2 = γ to potentially a very different rate in the second phase (β4). This type of abrupt change in rate at γ does not seem very plausible if f2 is viewed as a continuous variable, 5 the implication being that values on the endogenous latent variable f1 corresponding to a one-unit change in the latent exogenous predictor are associated with distinctly different slopes. A more realistic supposition, perhaps, is that the transition between phases is smooth and gradual. Several modifications to the linear–linear model have been suggested in the literature resulting in a less abrupt shift from one phase to the next (see, e.g., Bacon & Watts, 1971; Seber & Wild, 1989). 6 Following Griffiths and Miller (1973), the form of the model adopted here is
where α1 is the expected value of f1 at the knot, γ (i.e., the knot is
It should be noted that the transformed parameters no longer correspond to change characteristics of the linear–linear processes like those parameters in the original formulation of the model (e.g., Equation 4). However, if there is empirical evidence that a smooth, rather than an abrupt, function is required, then the formulation in Equation (5) may be justified. Another intended benefit of the transformation will occur when carrying out hypothesis tests on the coefficients. Testing α3 in Equation (5) is a test if the slopes between the two regimens are the same, that is, whether there is a significant phase shift or not. This can be carried out by comparing the estimate with its standard error. Furthermore, since the regression coefficients,
It should be noted that the values of the two functions representing the different phases are not restricted to be equal at the knot. That is, there may be a discontinuity in the endogenous–exogenous relation at this point of transition. For example, in the context of random coefficient models for repeated measures data, Cudeck and Codd (2012) examined a phenomenon called reminiscence, which described unrehearsed improvement from one time point to the next. The authors developed a piecewise model to account for the disjointed change across the span of the study period.
Model Estimation
Conditional Distributions
Nonlinear structural models such as Equation (5) have a combination of endogenous and exogenous latent variables with the caveat that the exogenous latent variable enters the model in a nonlinear fashion. This was also true with Equation (4). More generally, a broad class of nonlinear structural models follows this same formula—at least one exogenous latent variable enters the regression model in a nonlinear fashion (Wall, 2009). The primary reason for making the endogenous–exogenous distinction is to facilitate improved computational efficiency of estimation (du Toit & Cudeck, 2009). Equation (5) is reproduced here for convenience,
Following Cudeck et al. (2009), for a particular value of the nonlinear exogenous factor,
where
It is assumed that the distribution of the exogenous latent variables is normal with moments:
The implication of conditioning on the nonlinear exogenous factor becomes clearer. Integrating the joint distribution of
The latent variables,
and corresponding covariance matrix
and where
These results imply that the measurement model for
Although the distribution of
where
The matrix of unique variable variances is
The derivation leading to Equations (10) and (11) completes the description of the model. For this example, there are 18 parameters:
Marginal Distribution
The nonlinear exogenous latent predictor has distribution
From Equation (10), the conditional distribution of
The joint density can then be specified,
The marginal distribution of
Among the many modern statistical techniques available to handle the integration suggested in Equation (13), techniques that are based on direct approximation, such as Gaussian–Hermite quadrature, may be preferred because of its straightforward implementation and accessibility to practitioners.
Gaussian–Hermite Quadrature
Gaussian–Hermite quadrature is used for numerical integration in statistically related applications because of its relation to Gaussian densities. Pinheiro and Bates (1995) and Davidian and Gallant (1993) established much of the theory surrounding the use of Gaussian–Hermite quadrature to approximate the likelihood for the nonlinear mixed-effects model, while Skrondal and Rabe-Hesketh (2004) demonstrated how this approach could be applied to a general class of latent variable models. Patefield (2002), and later Wall (2009), demonstrated how this same technique could be used for nonlinear structural equation models. Gaussian quadrature is a numerical integration method that approximates integrals of functions using a weighted average of the integrand evaluated at a predetermined set of abscissa (Davis & Rabinowitz, 1984).
With this rule, an integral over a function which can be expressed as
where
with
It should be noted that where the first two moments of
The log-likelihood function to be maximized for a sample of N observations,
For the data analysis in the next section, a Newton–Raphson optimization algorithm was used with Q = 30 quadrature points. 7
Piecewise Model for Latent Verbal Reasoning
To illustrate the utility of the model and estimation method, data will be used that were obtained from a large educational monitoring study of high school students. Among the multitude of collected information, variables pertaining to verbal reasoning and verbal acuity were gathered.
Variables making up the measurement model in Equation (1) are
Table 1 shows sample statistics for a sample of 10th-grader students (N = 250).
Sample Correlations, Means, and Standard Deviations for Five Verbal-Based Measures With a Sample of N = 250.
Fitting any nonlinear structural model requires a bit of finesse at the onset because convergence using methods such as Gaussian–Hermite quadrature to obtain maximum likelihood estimates are quite sensitive to, and actually depend on, the quality of starting values used in the algorithm. Initial values for the regression coefficients in the nonlinear structural model in Equation (5) were obtained by first fitting the manifest variables with a confirmatory factor analysis model allowing the factor means to be estimated and factors to correlate. Using the estimates of model parameters at convergence, predicted factor scores are then computed and submitted to a regression analysis using nonlinear least squares estimation. An approximate starting value for the variance of the regression error (i.e., var(d)]) in the structural model can also be obtained from this analysis. Starting values for the measurement model can be obtained vis-à-vis the confirmatory factor analysis, which can be handled by any structural equation modeling software program.
Maximum Likelihood Estimates
Table 2 contains the maximum likelihood estimates for the fitted structural model, while Table 3 contains estimates for the measurement portion of the model. Standard errors for the parameters were obtained as a by-product of the Newton–Raphson algorithm, which uses the inverse of the Hessian matrix (second partial derivates of the log-likelihood function with respect to the parameter vector, evaluated at
Parameter Estimates and Standard Errors for the Piecewise Latent Regression Model.
Parameter Estimates and Standard Errors for the Measurement Model.
Each of the regression parameters are large compared with their standard errors, thus would be considered statistically significant at all nominal levels. At the knot (
To see how well the model fits the data, Figure 2 displays the fitted structural model superimposed on a graph with individuals’ predicted latent variable scores on f1 and f2. Strikingly, the relation between verbal reasoning and verbal acuity in the first phase shows a slow, steady increase until verbal acuity is approximately 17 on the scale of the word pair classification measure. At that point verbal ability appears to take off—increasing in a more rapid manner than when there was less verbal acuity.

Fitted piecewise linear–linear function superimposed on individuals’ predicted factor scores.
Of particular note in Figure 2 is the fact that some subjects’ bivariate factor scores in the first phase are separated from the mass of points showing more variability than those in the second phase. Consequently, the linear function in the first phase has been pulled toward these influential points. Although not acted on here, a sensible course of action may be to compute a diagnostic, case deletion statistic such as Cook’s distance to assess and better understand the effects of individual data on the analysis. Another reasonable approach is to fit the structural model with an estimation algorithm, such as generalized least-squares, that gives less weight to points in the regression that are further away from the fitted function.
Based on a visual inspection of Figure 2, the smooth linear–linear piecewise model fits the data well. One might wonder if other functional forms may fit slightly better. For completeness, three other functions were also fitted to the data: (a) a linear–linear piecewise model with abrupt transition at the changepoint (i.e., the function in Equation [4]), (b) a quadratic–linear piecewise model (Cudeck & Harring, 2010) with first- and second-order continuity constraints, and (c) a simple quadratic model of the form
The Bayesian information criterion (Schwarz, 1978) was used to adjudicate the fits of the models. These values are summarized in Table 4. Although all the competing models show similar data–model fit, the linear–linear model with smooth transition might well be preferred based on the theoretical notion that increase in verbal reasoning occurs more gradually at the changepoint in verbal acuity, but the rate of change in each phase tends to be constant.
Bayesian information criterion (BIC) Values for Four Competing Latent Regression Models Fitted to the Education Data.
Discussion
This research study considers a piecewise regression model for describing the bivariate relation between latent variables where the latent constructs are measured by a set of observed variable indicators. To accommodate this added complexity, the nonlinear regression model is augmented with a measurement model that characterizes the relation between observed and latent variables.
When the knot is unknown (as is true in this current work), then the structural model becomes intrinsically nonlinear which complicates the estimation of model parameters via maximum likelihood. The proposed linear–linear piecewise function is nominally a five-parameter model; however, the parameters are constrained so that the segments join at the knot, resulting in four independent coefficients. Constraining the linear–linear model to make a smooth transition rather than an abrupt change may be reasonable given the continuous nature of the latent predictor. The model was subsequently transformed to incorporate this feature.
A version of maximum likelihood estimation was used here that reduced the number of dimensions of integration to one—a nontrivial savings in computation time. Whatever algorithm is used, however, it must be able to handle the intrinsic nonlinearity of the piecewise function. As Wall (2009) pointed out, conventional estimation methods appropriate for fitting linear structural equation models focus on minimizing a discrepancy function between the observed and modeled covariance matrix and, this cannot be extended in a straightforward way to handle nonlinear structural models of the type explicated in this article.
Spline regression is an attractive alternative to modeling nonlinear data that exhibit distinct phases. Frequently, the model can be tailored so that regression parameters correspond to interesting features of the underlying relation. The knot, an interesting parameter in its own right, is the value of the exogenous predictor at which the bivariate relation changes. In the current example, the knot represents a level of verbal acuity at which verbal reasoning increases, but at a much more rapid rate. This type of valuable information may be used by practitioners to suggest curricular modifications, timing of interventions, or simply broader programmatic changes.
Footnotes
Appendix
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) declared receipt of the following financial support for the research, authorship, and/or publication of this article: The research reported here was funded by a grant from the Institute of Education Sciences, U.S. Department of Education, to the University of Maryland (R305A090152). The opinions expressed are those of the author and do not represent views of the Institute or the U.S. Department of Education.
