R code for Tests involving Shape Restrictions
TESTS INVOLVING SHAPE RESTRICTIONS
PART I: Constant vs Monotone Increasing
The model is yi =f(xi)+ &epsiloni, for i=1,...n,
where the &epsiloni are iid mean zero with common variance.
The function f is known to be non-decreasing, interest is in testing
H0: f is constant versus Ha: f is increasing
The traditional test (Robertson, Wright, and Dykstra (1988), chapter 2 or Silvapulle
and Sen (2005), chapter 3, does not assume that f is smooth, or even continuous.
The code is here:
R code for constant vs increasing regression function
If f can be assumed to be continuous with continuous first derivative, the following test has better
power (Meyer (2008)).
R code for constant vs increasing regression function, smoothed alternative
PART II: Linear vs convex regression function
For the unsmoothed alternative, see Meyer (2003)
R code for test of linear vs convex regression function
If f can be assumed to be continuous with continuous first and second derivatives, the following
test has better power (Meyer (2008)).
R code for linear vs convex regression function, smoothed alternative h3>
PART III: Monotone vs unconstrained regression function
R code for monotone versus unconstrained, smoothed regression function h3>
meyer@stat.colostate.edu