Clear Filters
Clear Filters

Repeated measures analysis with 2 predictors

2 views (last 30 days)
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 Comments
the cyclist
the cyclist on 30 Jun 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 on 4 Jul 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

Sign in to comment.

Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!