Does treating trial number as a continuous variable for linear models lose information? If I create a linear model where Trial number is one of the predictors, am I losing any information by treating it as continuous (when in fact it is actually discrete + ordinal)? I believe the answer is no, but my google-fu fails to find a good explanation of why.
EDIT to add: there are between 16-48 trials per block in the current set of analyses.
MORE EDITS to add: Blocks terminated after a minimum number of trials (16) and a criterion was reached (10 of previous 12 trials correct) or after 48 trials, whichever came first.
There are two types of analyses I'm performing: 
(1) forward learning curves from the start of the block, which only go up to trial 16 (and thus there is no missing data). 
(2) backward learning curves where trial number is normalized to the point at which a criterion was met (not the same as block termination criterion, but close enough) on a particular trial, which we call Learning Point (LP). Then trials are LP-2, LP-1, LP, LP+1, etc. The issue is that the further away you get from LP, the fewer trials are left in the data set (technically there can be an LP-23, but there are very few participants who have one). So I'm trying to run a learning-centred analysis that allows for missing data (hence using linear mixed models instead of ANOVA etc).
I'm using mat labs fitlme function, and the results of my model differ if I say that trial is ordinal vs if I leave it as a continuous variable (the default). Not in any way that actually matters to the qualitative pattern of results, but I'd like to be statistically rigorous about this.
EDIT: I'm using a mixed model with Subject as a random effect and Trial as fixed. My inclination is to treat Trial as continuous rather than ordinal because a difference of, e.g. 3 trials is half the distance between 6 trials, which is not the case if I treat it as ordinal. 
 A: Treating ordered categorical predictors as continuous is discussed extensively on this page. With a fairly large number of ordered levels for your trial numbers you have the following two extreme approaches:
Treating trial number as a continuous predictor will only use up one degree of freedom in the analysis, but at the cost of assuming that a 1-unit change in trial number has the same effect on outcome (continuous for ordinary linear regression, log-odds for logistic regression), regardless of trial number (other things being equal). That is the critical issue with respect to "validity" of that approach, although you can test that linearity assumption in the same way you test the linearity assumption about any predictor in a regression.
At the other extreme, treating trial number as a categorical (albeit ordered) predictor will use up a large number of degrees of freedom: for 16 trial numbers, 15 degrees of freedom. That can reduce the power of your analysis substantially and runs a risk of overfitting unless you have very many subjects.
There are, however, useful intermediate choices you could make. These are compatible with mixed models of the type you wish to build.
You could use a restricted cubic spline to fit a reasonably smooth function of trial number as part of the regression. That provides flexibility in the relationship between outcome and trial number while only using up a few degrees of freedom, depending on the number of knots you specify. A quick search shows a MATLAB implementation of this approach.
Another intermediate choice, discussed on this page with several references, is to penalize the coefficients for the ordered categorical variable in a way that effectively reduces the number of degrees of freedom used up and thus the danger of overfitting when you have a large number of categories. That's implemented in the ordPens package in R, with some background to the approach described in this paper.
So to answer your question: yes, treating trial number as a continuous predictor could lose some information. How much that matters, and whether other alternatives to full categorical coding could be useful, will depend on your data and on your study design. Remember: "All models are wrong, but some are useful."
