3
votes

Description of data

I have 3 datasets stored in data frames and called: df1, df2 and df3. Each data set measures something different at the same time but using the same variables: V1, ..., V7.

For this work, I can say that each data set represents a multivariate time series since all variables are measuring the samething for each data set at many times: 1, ...,.6,... n. Additionally, we can assume that all data sets represent 3 multivariate time series as there are three data frames.

The shape of data:

head(df1)
   Time   V1   V2         V3         V4          V5         V6         V7
X1 10:00  0 0.1182197 0.09057301 0.08089888 0.003350084 0.00000000 0.00000000
X2 10:01  0 0.1276078 0.09242144 0.01348315 0.060301508 0.02245599 0.02298152
X3 10:02  0 0.1369958 0.12569316 0.03595506 0.159128978 0.04491198 0.04596305
X4 10:03  0 0.1029207 0.10166359 0.08089888 0.201005025 0.06736798 0.06894457
X5 10:04  0 0.1585535 0.14510166 0.08089888 0.112227806 0.08982397 0.09192609
X6 10:05  0 0.1488178 0.00000000 0.07415730 0.212730318 0.11227996 0.11490761
                                .
                                .
                                .


#df2 and df3 have the same shpae, time and dimensions exactly as df1 but with different values.

I have two questions:

1. When plotting data of df1 only, which is more correct to represent this time series:

1.1 To consider the whole data frame as a time series, so to do

library(mvtsplot) 
mvtsplot(df1)

1.2 or to consider each row as a time series and to plot n time series

#considering that there are 10 rows in df1
ts.plot(X1,..,X10)

2. Can I plot the three multivariate time series in the same plot so to have a figure contains the 3 multivariate time series.

EDIT: Following to the comment of rajah9, The data of df1 represent a certain amount of gas measured by 7 sensors (variables V1, ..., V7 ) each minute. The other two df2, df3 represent another types of gases measured using the same sensors at the same time but in different experiments. Each data frame seems like a multivariate time series and I don't have a dependent variable. Are my thoughts correct?

Any answer or link to a similar question would be appreciated.

1
If this is a time series, which vector has the time? They all look like dependent y variables, and you'll need the independent time variable as well.rajah9
thanks for posting the time series. Does this help? stackoverflow.com/questions/59195398/… or perhaps stackoverflow.com/questions/64580526/…rajah9
@rajah9 Thanks a lot for the links. It seems that questions in your links asking to plot many univariate time series in the same plot. My question is different. I want to know what is the correct way to plot a multivariate time series. Then, how to plot many multivariate time series in the same plot? Additionally, why don't you think that using mvtsplot() could be more correct for the questions asked in your attached links?Flore

1 Answers

0
votes

Q1

It looks like for Q1.1 that mvtsplot is the way to go, as it was designed for multivariate time series.

You can see the mvtsplot documentation.

Q2

Assuming that the three plots have close to the same data, you could for Q2 plot them all on the same graph, but I think it would be quite difficult to distinguish.

Do the three dataframes on one graph tell a different story? Or would the reader's eye be naturally drawn to an anomaly in, say, df3?

Try plotting df1, df2, and df3 separately first.