r - How to apply splom() function in order to create multiple correlation pairwise plots? -


I have already asked to create the following shape: I was suggested to use the SPOM () function but I do not know how to implement it on my data. I saw that the example of the polyio () function has been seen, but due to my low programming skills I am not able to implement it.

I have 24 times the series, which is related to 4 independent groups (4 Peer) correlation plot) 4 groups:

1) frequency = 1 with minimum, timed series: AAPL_1m, MSFT_1m, INTC_1m, FB_1m, MU_1m, IBM_1m 2) Frequency = 2 with minimum, timed series: AAPL_2 M, MSFTI2M, INTC_2M, FB_2M, MU_2M, IBMMMM. 3) Frequency = 5 with minimum, timed series: AAPL5M, MSFTI5M, INTICIRMMM, FBIIMMM, MUINMM, IBBMMMM. 4) Frequency = 10 with minimum, timed series: AAPL_10M, MSFTATM, INTC_10M, FB_10M, MU_10M, IBM_10M.

In each partner conspiracy, the relationship between the time series should be shown in each group. To create the conspiracy of each individual pair I used the following functions:

  added (cbind (AAPL_1m, MSFT_1m, INTC_1m, FB_1m, MU_1m, IBM_1m), main = "frequency = 1 minimum. ", Add the font .labels = 2, col =" blue ", pch = 16, cex = 0.8, cex.axis = 1.5, las = 1) (cbind (AAPL_2m, MSFT_2m, INTC_2m, FB_2m, MU_2m, IBM_2m), main = "Frequency = 2 min.", Font.labels = 2, col = "blue", pch = 16, cex = 0.8, cex.axis = 1.5, las = 1) (cbind (AAPL_5m, MSFT_5m, INTC_5m, FB_5m) , MU_5m, IBMMTM), main = "Frequency = 5 min.", Font.labels = 2, col = "blue", pch = 16, cex = 0.8, cex.axis = 1.5, Las = 1) (Cbind (AAPL_10m, MSFT_10m), INTC_10m, FB_10m, MU_10m, IBM_10m), main = "frequency = 10 minutes", font.labels = 2, col = "blue", pch = 16, cex = 0.8, cex.axis = 1.5, Las = 1)  

If a person suggested to implement the SPAM () function to create the mentioned / narrated data then it would be greatly appreciated.

In addition to this, if there is one more suitable task that can be integrated into individual pairs of plots (pairs) in a single shape, then I am eager to implement it.

Something good for some demodata, but let's first generate something, for just three variables: < / P>

  AAPL_1m & lt; -Norum (1000) MSFT1 TM & lt; -nnorm (1000) INTC_1m & lt; -nnorm (1000) AAPL_2m & lt; -nnorm (1000) MSFT_2m & lt; -nnorm (1000) INTC_2m & lt; For working  splom ()  you will need to create a grouping variable here - 1000 observation from 1m group, and 2 - nnorm (1000)  

An overview of 1000 from the M group. The group variable will only have a simple vector of 1000 1m value and then 1000 2m value:

  group  

In your case, group variables can be generated as follows:

  Groups & lt; -c (representative ("1m", length (AAPL_1m)), representative ("2m", length (AAPL_2m)))  

After the variables in your group, you may One of the following wants to pack everything into the dataframe:

  dat < -data.frame (AAPL = c (AAPL_1m, AAPL_2m), MSFT = c (MSFT_1m, MSFT_2m), INTC = c (INTC_1m, INTC_2m), group = group)  

There is a data frame with a grouped variable that gives a group of observations, you can find scatterplot matrix:

  Library (Latis) # Three first columns of data grouping spam (~ The conditional plot should be broadly shown as:  : //i.stack.imgur .com / MrCJ7.jpg "alt =" Image Image Here Enter ">  

This will need to normalize your four batch data, but it must be Stravedworld (grouping for just four batches, and all four separate batches tied together) There are too many arguments in the function splom () for which you can use, for example, make plots beautiful.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -