Error in displaying linear mixed effect model created with fitlme
3 views (last 30 days)
Show older comments
I am currently attempting to fit a linear mixed-effect model to my data, which consists of three predictor variables (sample, disease, intensity) and one response variable (response).
Previously I used two-way repeated measures ANOVAs to analyze this data, as my study design records responses from the same sample at multiple intensities. However, in this case the number of missing datapoints makes this impossible.
I have placed my data into a table called 'dataTable' after converting my predictor variables to categorical arrays and keeping my response variable in double format. All rows within my response array for which no response was recorded contains a 'NaN' value. Example:
Following the example of others, i generate a linear mixed model using the following code:
lme = fitlme(dataTable,'response ~ disease + intensity + (1|sample)');
This code successfully generates an lme object. However, attempting to display this object using display(lme), outputs the following to the command window:
lme =
Linear mixed-effects model fit by ML
Model information:
Number of observations 174
Fixed effects coefficients 10
Random effects coefficients 23
Covariance parameters 2
Formula:
sumPlats ~ 1 + disease + intensity + (1 | sample)
Model fit statistics:
AIC BIC LogLikelihood Deviance
1555.4 1593.3 -765.72 1531.4
Fixed effects coefficients (95% CIs):
Error using tcdf
Too many input arguments.
Error in classreg.regr.lmeutils.StandardLinearLikeMixedModel/fixedEffects (line 880)
P = 2*(tcdf(abs(T),DF,'upper'));
Error in classreg.regr.LinearLikeMixedModel/fixedEffects (line 2768)
fetable = fixedEffects(model.slme,alpha,dfmethod);
Error in LinearMixedModel/fixedEffects (line 2628)
[beta,betanames,fetable] =
fixedEffects@classreg.regr.LinearLikeMixedModel(model,varargin{:});
Error in LinearMixedModel/tstats (line 919)
[~,~,table] = fixedEffects(model);
Error in classreg.regr.CompactParametricRegression/get.Coefficients (line 240)
tbl = tstats(model);
Error in LinearMixedModel/displayFixedStats (line 1053)
ds = model.Coefficients;
Error in LinearMixedModel/disp (line 219)
displayFixedStats(model)
I'm not sure how to fix this problem. I've attempted this analysis by changing my predictor variables to nominal values, or keeping my intensity predictor variable in double format, with little success. Any help would be greatly appreciated.
3 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!