Convert anovan syntax to linear mixed-effect model - Nested experimental design
古いコメントを表示
I would like to convert the syntax below using anovan into a linear mixed-effect model. Below a mock and small example of my experimental design. Namely, I have two genotypes (WT and Mut), for each genotype I choose randomly a mouse (Mouse ID), and from each mouse I take slices (SliceID), and finally from each slice I obtain a slope value (Slope). To summarize, I have a fixed factor (Genotype), random variable MouseID nested in Genotype and random variable SliceID nested in MouseID variable. My experimental question is the following: Does slope (my dependent variable) change across genotypes? It is a nested design experiment, and I would like to reflect the desing in my linear mixed-effect model.
Slope=[12 15 16 10 100 102 135 107];
SliceID=[{'s1'},{'s2'},{'s3'},{'s4'},{'s13'},{'s14'},{'s15'},{'s16'}];
MouseID=[{'M1'},{'M1'},{'M2'},{'M2'},{'M3'},{'M3'},{'M4'},{'M4'}];
Genotype=[{'WT'},{'WT'},{'WT'},{'WT'},{'Mut'},{'Mut'},{'Mut'},{'Mut'}];
nestedMatrix=[0 0 0; 1 0 0; 0 1 0];
[p,tbl,stats,terms] = anovan(Slope,{Genotype,MouseID, SliceID},'random', [2,3],'nested',nestedMatrix,'varnames',{'Genotype','MouseID','SliceID'});
DataTable=table(Genotype',MouseID', SliceID',Slope','VariableNames',{'Genotype','MouseID','SliceID','Slope'});
I would like to convert the anovan syntax into a linear mixed-effect model (using the function fitlme). This is because the anovan function is not supported for further multicompare in case I would like also to introduce a repetitive measure (longitudinal study). My difficulty is to code for the fitlme function the appropriate syntax to reflect two random and nested variables (SliceID nested in MouseID and MouseID nested in Genotype).
I tried to use the examples in the Mathwork pages, but none really fit my design.
Any help is much appreciated
回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で Repeated Measures and MANOVA についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
