This function checks if the predicted values from a linear model are monotonically increasing or decreasing across a range of L values for multiple age points.
lm_model: An object of class 'lm' representing the fitted linear model.
pred_data: Matrix with prediction values
minRaw: lowest raw score in prediction
maxRaw: highest raw score in prediction
Returns
A named character vector where each element corresponds to an age point. Possible values for each element are 1 for "Monotonically increasing" -1 for "Monotonically decreasing", or 0 for "Not monotonic".
Details
The function creates a prediction data frame using all combinations of the provided L values and age points. It then generates predictions using the provided linear model and checks if these predictions are monotonically increasing or decreasing for each age point across the range of L values.