How to do stepwise knots selection based on AIC/BIC criteria in Linear mixed effect model?
Afficher commentaires plus anciens
HI I intend to choos knots of spline basis function in matlab based on some matmethically rigid way. So can anyone tell me how to do stepwise knots selections based on modelc selection criteria (AIC/BIS/CV)? I am putting a sample codes below.
x=1:50;y=randn(1,50);G=1:5;
X = [ones(1665,1),x];
num_knots=length(x);
knots=(quantile(unique(x),linspace(0,1,(num_knots+2))));
d=4 ;
t=[zeros(1,d) knots repelem(max(x),d)];
range=[min(x) max(x)];
z=bspline_basismatrix(d,t,x);
Z=[ones(1665,1) z];
lme = fitlmematrix(X,y,Z,[],'CovariancePattern','Isotropic','FitMethod','REML','FixedEffectPredictors',....
{'Intercept','Time'});
For now I just took a random selection of knots. Any help would be appriciated.
Réponses (1)
Gautam Pendse
le 6 Fév 2018
0 votes
Hi Mithun,
You can access model criteria for a LME model via the ModelCriterion property. Candidate models can be compared using a criterion such as AIC (lower is better).
Hope that helps,
Gautam
Catégories
En savoir plus sur Gaussian Process Regression dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!