Hi,
Â
I have a system in which I analyze 2 subjects and 1 variable, so I have
2 models as follow:
Â
y ~ x_1[, 1] + x_2[, 1] + x_1[, 2] + x_2[, 2]
Â
Where
Â
x_1[, i] = cos(2 * pi * t / T_i)
x_2[, i] = sin(2 * pi * t / T_i)
Â
i = 1, 2
Â
Data have two columns: t and y.
Â
As you can see, I have a multiple components model, with rithm and
without trends, and I have a fundamental period (T_1 = 24 hour; T_2 = 12 hour).
Â
I have to compare the parameters between the two models (one for each
subject), using a parametric test as described in the doc I adjunt (page 500,
Parametric solution):
Â
I have to reach results as follow:
Â
______________________________________________________
H0: Equality of...         df        Â
            F               p
______________________________________________________
MESORÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ( 1, 171)Â Â Â 224.0246
   <0.0001
(A,phi) 24h                 ( 2, 171)    Â
  7.6332     0.0007
(A,phi) 24h                 ( 2, 171)       5.8370Â
    0.0035
Rhythmic
components     ( 4, 171)    Â
  6.3568   <0.0001
Whole model               (
5, 171)Â Â Â Â Â 51.6583Â
  <0.0001
I know how to obtain df values and I know how to obtain F and p for the
whole model, because whole model means that all parameters of the two series
are equal, so it means that all values are in the same serie, so I construct a
unique serie concatenating the respective tâs and yâs vectors.
Â
The problem is that I donât know how to obtain F in the other cases (H1:
equal mesor, H2.x: equal amplitude and acrophase, H3: equal rhythmic
components). I suppose I have to use dummy variables, but I donât know how to
do it.
Â
I could access something similar in a solution manual of a Weisberg
book (1985), chapter 6, problem 9, as follows:
m1 <- lm(Yvar~ Xvar + Fvar + Fvar:Xvar, na.action=na.omit,
weights=theWeights)Â # this is model 1 the most general
m2 <- lm(Yvar~ Xvar + Fvar           , na.action=na.omit,
weights=theWeights)Â # this is model 2 parallel
m3 <- lm(Yvar~ Xvar + Fvar:Xvar      , na.action=na.omit,
weights=theWeights)Â # this is model 3 common intercept
m4 <- lm(Yvar~ Xvar                  , na.action=na.omit,
weights=theWeights)Â # this is model 4 the least general (all the same)
Â
Please could you help me?.
Â
Thank you in advance.
Eva
Â
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.