Azzera filtri
Azzera filtri

Repeated measures analysis with 2 predictors

2 visualizzazioni (ultimi 30 giorni)
I have data on measurements Y in 2 types of vegetation in ~20 days with 5 repetitions in each vegetation type. I need to do repeated measure analysis.
I organized the data in the table with columns:
Datenum, Vegetation, No of repetition, Y.
When I do:
rm = fitrm(data,'R ~ Datenum*Vegetation');
ranovatbl = ranova(rm);
I get an apparently wrong table:
SumSq DF MeanSq F pValue pValueGG pValueHF pValueLB
_____ __ ______ ___ ______ ________ ________ ________
(Intercept):Time 0 0 NaN NaN NaN NaN NaN NaN
Vegetation:Time 0 0 NaN NaN NaN NaN NaN NaN
Datenum:Time 0 0 NaN NaN NaN NaN NaN NaN
Vegetation:Datenum:Time 0 0 NaN NaN NaN NaN NaN NaN
Error(Time) 0 0 NaN NaN 0.5 0.5 0.5 0.5
What is the error? Should I add 'WithinDesign' parameter? Which one? When writing 'WithinDesign', data.Datenum it gives the error:
Specified design has 152 points; 1 required.
Thanks
  2 Commenti
the cyclist
the cyclist il 30 Giu 2023
It would be vastly easier to help you debug this if you upload the data. You can use the paper clip icon in the INSERT section of the toolbar.
Fyodor Tatarinov
Fyodor Tatarinov il 4 Lug 2023
Original data are in the Sheet1 of attachment. Finally I reorganized the data as in Sheet3 making dates as columns and excluding all rows and columns with missing values. In such configuration it worked

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Tables in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by