[R] Variance of multiple non-contiguous time periods?

Jim Lemon jim at bitwrit.com.au
Thu Oct 30 21:19:01 CET 2014


On Wed, 29 Oct 2014 05:12:19 PM CJ Davies wrote:
> I am trying to show that the red line ('yaw') in the upper of the two
> plots here;
> 
> http://i.imgur.com/N4Xxb4f.png
> 
> varies more within the pink sections ('transition 1') than in the light
> blue sections ('real').
> 
> I tried to use var.test() however this runs into a problem because
> although the red line doesn't vary much *within* any particular light
> blue section, it does vary a lot *between* light blue sections.
> 
> For example, in the light blue section around t=90 the red line 
doesn't
> move much & likewise in the light blue section around t=160 the 
red line
> doesn't move much. But between these two sections the red line 
has moved
> substantially.
> 
> So if I simply subset the data according to pink/light blue & then put
> those resultant subsets into var.test(), the answer does not show 
the
> relationship that I want it to.
> 
> Can anybody shed some light on a sensible method of solving this?
> 
Hi CJ,
If your dataset has the transition type coded for each observation:

rotation	transition 
90		blue
90		blue
115		pink
-10		pink
30		green
...

you could aggregate all the observations within each transition type 
and test that.

Jim



More information about the R-help mailing list