instruction
stringlengths
9
38.7k
I have a monthly time series of a water quality parameter. I used copula-based Markov process of C(Y(t), Y(t-1) and I forecasted the mean behavior of Yt by following equation: Now, I need to find the probability that for a given month, my water quality (Yt) will be lower than a predefined value (a critical value that...
I'm using Eureqa, as machine learning tool to fit a formula to my data. I found out that the formula fits my test data better than my training data! Is this abnormal?
I am using R's package spatstat to study the locational pattern of conflict events in Africa (around 8.000 points) using point pattern analysis techniques. I was able to obtain the plot of $g(r)$, the pair correlation function, using the contour of the African continent as my study region. The size of the enclosing rec...
I'm working on a project looking at the relationship between exposure to several different drugs on the risk of preterm delivery in a cohort of pregnant women with a particular disease. I'm confident that I need to use a time-dependent variable in a Cox PH model for the drug exposures as women started the drugs at vari...
My dataset contains a lot of variables that appear to me as practically categorical on a continuous scale to differing degrees. Many have a large chunk of zeros or specific value followed by one or more apparent separate chunks. In some cases this is obvious where there are literally 2 specific single effectively on/of...
i have a data set that is strictly binary. each variable's set of values is in the domain: true, false. the "special" property of this data set is that an overwhelming majority of the values are "false". i have already used a bayesian network learning algorithm to learn a network from the data. however, for one of my ...
I have a distance matrix for some data I want to cluster. However, I don't just want to assign elements to clusters, but I also want to assign a probability for each element to belong to each cluster. Can you give me examples of clustering algorithms that can do that? Is there, for instance, a hierarchical clustering ...
I have a question where I am given a short story: An investigator wishes to evaluate the effect of medicine administered for colds on reaction time. Data represent the reaction times (in seconds) on a stimulus one hour after each of four randomly chosen brands of this type of medicine was administered to 5 peopl...
Say there is a hypothesis that A causes B (A -> B), and some likelihood that the hypothesis is correct (AB1%). Now, an experiment is run that claims to find a correlation between A and B. What I would like to know is whether my new probability (AB2%) is greater than, or less than, my previous probability (AB1%). Common...
I have weekly data which I am considering as reference. So Mondays trend for example.. orders will kind of serve as valid data to make predictions for orders throughout the day for every Monday. I looked at the lm() and predict() functions in R, but it seems that they just predict based my previous data model. They don...
I am solving a clustering problem on a trivial dataset with the k-means algorithm. I am running a couple of tests and, from time to time, one centroid doesn't attract any points, i.e. I've got an empty cluster (see the purple "x" in the picture). What should I do? Shall I delete it or just stop updating its value? Why?...
I understand that the reliability and validity are key while constructing a questionnaire. Kindly advise if the following procedures are appropriate to devise a questionnaire: After creating all the items in the questionnaire, I plan to test the question with a sample of 25 participants. Next, I will re-test the same ...
I am using a 2X3X4 design, which has the following ivs: Social Anxiety Scores(formed two groups,essentially high and low scores) 3 emotions and 4 gaze directions. I need to test if the groups are essentially different(before I do my mixed anova). I thought I could do this through an independent t-test. As I have tried ...
I am attempting to construct a contrast matrix that I can run in R, using the limma bioconductor package, but I am not sure that I have coded the contrast matrix correctly. A previous post and the limma guide were helpful, but my two factorial design is more complicated than what is illustrated there. The first factor ...
I have a dataset of 113 variables. In exploratory analysis the first thing I want to know is what are the most important factors on a single variable (revenue). I learned that naive Bayes would work, but I do not know how. I am using e1071 package and coded according to the example: library(e1071) data(iris) classi...
Say I have a sequence of yes-no trials where the probability of winning decays over time as the supply of wins is gradually exhausted. Assume that for every trial the probability of replacement is not 1 nor 0, but some other value. Are there any known distributions that model this behavior?
Let's say I have two databases, in the first (DB1) there is individual data on how much people trust in the government ($X_{j,r}$), and on the second (DB2) there is individual data on how much people donate $Y_{i,r}$ (I use $j$ instead of $i$ to make clear the individuals observed in both databases are not the same). ...
I am confused by different terms of logistic regression. What are the differences between stepwise, kernel, forward, and backward?
I am having difficulty in deriving k-means from Mixture of Gaussians. I am following the notation from Bishop (2006), Section 9.3.2: Suppose we have : $$ p(\mathbf{x}| \boldsymbol{\mu}_k, \boldsymbol{\Sigma}_k ) = \frac{1}{(2\pi \epsilon )^{1/2}} \exp \left( \frac{ -1 }{ 2 \epsilon } \| \mathbf{x} - \boldsymbol{\mu} ...
I'm trying to visually compare how three different news publications cover different topics (determined through an LDA topic model). I have two related methods for doing so, but have received lots of feedback from colleagues that this isn't very intuitive. I'm hoping someone out there has a better idea for visualizing ...
The mean of the hypergeometric distribution is: $n \frac{K}{N}$ where: $n$ is the number of draws $K$ is the number of successes N is the size of the finite population. As the population size, $N$, goes to infinity, I would expect to have a situation with "replacement", and have the mean to converge to the mean of ...
I need your advice regarding a complicated design. I am testing data regarding new eye drops that suppose to decrease some quantitative measure. For every subject, one eye is randomly assigned with the drops, while the other is a control, and prior applying the drops, this measure (Y from now on) is measures on both ey...
I am using the glmer function from the lme4 package in R, and I'm using the bobyqa optimizer (i.e. the default in my case). I am getting a warning, and I'm curious what it means. Warning message: In optwrap(optimizer, devfun, start, rho$lower, control = control, : convergence code 3 from bobyqa: bobyqa -- a trust...
I am doing some independent study in asymptotic statistics and point estimation and am aware that you can get from log transformations of uniform random variables (exponential) all the way up to chi-squared distributions but I came across an intriguing question and I'm not sure how to handle it. I was thinking CLT or D...
Original question: If population 1 consists of blended piles of size X_1 and population 2 consists of blended piles of size 4*X_1. Should I expect the standard deviation of X_1 to be equal to 4*the standard deviation of X_2 ? How do I otherwise compare the standard deviation of these two populations? Edit to reword t...
I am doing some independent study in asymptotic statistics and point estimation and am aware that you can get from log transformations of uniform random variables (exponential) all the way up to chi-squared distributions but I came across an intriguing question and I'm not sure how to handle it. I was thinking CLT or D...
I have a very beginner question. I am attempting to forecast total 2014 unit sales of a large number of products. The data I have has 10 points for each individual product, which are the total unit sales for each of the previous 10 years. I also have the total yearly store revenue for the last ten years, which I can u...
I am not well versed in statistics. I wanted to know why we use the determinant of the covariance matrix instead of having the covariance matrix itself when writing down the multivariate normal distribution. Why do we do this and what is the intuition behind it? I have noticed that for a basic Maximum Lkikelihood estim...
I estimated the so called translog production function: $$ y_{it} = \beta_0 + \beta_1 k_{it} + \beta_2 l_{it} + \beta_3 k_{it}^2 + \beta_4 l_{it} \times k_{it} + \beta_5 l_{it}^2 + \epsilon_{it}, $$ where $y$ is the natural logarithm of gross output; $l$ is the log of labour; and $k$ is the log of capital. I also have...
I am having trouble to understand the min {X,Y} where X and Y are independent random variables. From the online source, it says that min{X,Y} < x if and only if X>x, Y>y. First of all, what exactly do you mean by the term "minimum " of the two random variables? Does it refer to the domains that X and Y can take, and ...
I've been working with JMP, and I have found that often I get a significant p value but a relatively small r. Is this supposed to happen?
I am quite new to Machine Learning and come from a computing background. I have a quite big set of features (~50) with about 4k observations. Is it correct thinking to include all of them in a multiple linear regression model? Wouldn't that possibly introduce overfitting? If that's the case, is it safe to manually ide...
In Gelman's Bayesian Data Analysis: The t distribution is the marginal posterior distribution for the normal mean with unknown variance and conjugate prior distribution and can be interpreted as a mixture of normals with common mean and variances that follow an inverse-gamma distribution. What precisely (in terms o...
We know that $Z\sim N(0, 1)$. How do I prove that $e^Z$ has a mean of $e^{0.5}$? I have tried integrating $e^z$ times the pdf of $Z$ but I don't know why it isn't working out. Also what is the pdf of $\exp(Z)$?
I've got an estimate of the number of site visitors I'll see in a 1 hour period clicking email links in a large email campaign. I need to make sure I've got the required server capacity. That means I need to estimate the peaks in usage on a smaller time scale. How do I calculate the expected distribution for the num...
I am currently working on a retrospective analysis where I am looking at patients to see if immune sensitization prior to a procedure has any bearing on outcomes after the procedure. The immune sensitization is a categorical variable (Hi vs Lo). In regards to outcomes, one of the things I am looking is survival analys...
For a given set of features (say with dimension a) and for a given set of labels (say m labels), how to relate the given features with the weight vector of the SVM in general? Will it be equal to product of the two dimensions always, or is it required to find the dimensions of the both the feature space and the label s...
I have a mean time to failure variable that is Weibull-distributed with shape parameter less than $1$. Whenever a failure occurs, corrective action of cost $c_c$ is performed. From time to time, preventive maintenance of cost $c_m$ is performed, which resets the time in the Weibull distribution. My question is, how do ...
I play a car racing video game on my tablet computer and I have collected data from 224 races. In the game, two cars are matched up head-to-head and race over a quarter-mile. I would like to determine the relative impact of certain factors on the likelihood of winning the race. A data file is available at http://csr....
I want to measure the accuracy of my GPS Receiver module. The real coordinates are obtained from the Google Maps, and the actual received coordinates are the ones that the GPS receiver received. I tried searching for statistical tools that can somehow support my findings. I tried using Chi-square test in Microsoft Exce...
Suppose that we know that captured data follow a particular distribution. We have 10 sample. 9 of them are close to the supposed distribution but the last sample seems to be very distant, or event "abberant". What is the term to use to qualify this sample ? Maybe "outlier sample" ? Thank you
Which binnedplot of the glmer should I use to check the model? The residuals against the predicted values without random part(REform=NA) or residuals against the predicted values with random part(REform=NULL)? I have one binary response variable (y.10) derived from one continuous variable with around 50 to 75% of zeros...
We know if Gaussian Mixture Model is a probablistic counterpart of k-means algorithm. Is there a probablistic counterpart for decision-trees? UPDATE: I know that branching in DT can be probablistic. But what I meant, is the way we create separated regions in the input space by each branching (as apposed to soft cluster...
Related Question: Learning weights in a Boltzmann Machine I'm trying to understand RBMs and how they are applied in training of Deep Architecture. Being new to the field of statistics, I stumbled upon various notations. Question 1: What does this symbol represent: <$s_is_j$> It is said while updating weights of RBMs t...
There is an example on how to run a GLM for proportion data in Stata here The IV is the proportion of students receiving free or reduced priced meals at school. The stata model looks like this.: glm meals yr_rnd parented api99, link(logit) family(binomial) robust nolog I'm interested in learning how to replicate this...
I want to find the sample size for logistic regression where I have a covariate with 15 levels and the covariates interacts with time, which means that the effect of the covariates is different for different periods of times. Can anyone help me find the sample size and effect size? I wish I could do this using simulati...
In many online games, when players complete a difficult task, sometimes a special reward is given which everyone who completed the task can use. this is usually a mount (method of transportation) or another vanity item (items which don't improve the performance of the character and are mainly used for appearance custom...
I am fitting a weibull model as follows: s <- Surv(DFBR[,"Time"],DFBR[,"Censor"]) wei <- survreg(s~ Group+ UsefulLife, data = DFBR, dist="weibull") How can I predict the probability of failure in next 10 days, for a new data with group =10 and usefuleLife =100
I wish to test the following Hypothesis: H = "sales growth from previous year" predicts "sales growth this year" I have the following data: > head(x) Location Week Sales_Y1 Sales_Y2 Sales_Y3 Y2_vs_Y1 Y3_vs_Y2 1 1_1 5 24924.50 21665.76 23510.49 0.8692556 1.0851449 2 1_1 6 46039.49 37887.17 36988.49 0...
I am currently trying to estimate some panel data models in R using PLM package. This includes the estimation of basic pooled, fixed effects and random effects models. Therefore I make use of this code: # read in data mydata<- read.csv2("Panel.csv") attach(mydata) # define dependant variable standarddeviation <- cbind...
I have calculated modulation indices (scalar) of neuronal responses for two categories of neurons $x, y$ recorded from two hemispheres $a, b$, with $n_{xa}=120, n_{xb}=80, n_{ya}=20, n_{yb}=20 $. I would like to know whether each category of neurons has significantly different modulation indices between the two hem...
Does the computation of an N x N correlation matrix for N unrelated variables require multiple comparisons correction for all the computed pairwise correlations (assuming each computed correlation is a 'comparison' in the sense of being a 'statistical test')? If so, would FWER be a more appropriate measure than Bonferr...
I have this problem: In betting situations one is often interested in odds, referring in the thumbtack tossing $\theta / (1 - \theta)$. Alternatively one may consider the log-odds: $\lambda=log(\theta/(1-\theta))$ Show that a uniform distribution for $\lambda$ implies the following distribution for $\theta$: $p(\theta)...
I have a 2x2, between-subjects experimental design (2 independent variables (IVs) with 2 levels each) and one dependent variable (DV). My data are unbalanced and an interaction between the IVs seems likely, so I plan to use ANOVA with Type III Sums of Squares to test whether my DV is different across one of my IVs whi...
What test for significance is best to use to test the difference between the change of a categorical variable in a control group and the change in a pilot group? The variable had three categories (e.g. on-street parking, off-street parking, and garage parking). We want to see if the change of the percent of people who ...
I’d like to discover which “calendar factors” (e.g. day of the week, month) have the strongest relationship with whether or not a particular product is sold at least once. For days when the product was sold, I have data like this: Date Day of Week Day Type Month 01-01-2014 Wednesday Weekday January 01-13...
I am trying to adjust a hierarchical multiple regression model and no matter which transformations I use (z-transformation, sqrt, cuberoot, inv, inv sqrt ...), I do not manage to get the residuals normally distributed. What can I do? Does anyone have any suggestions? I also checked out a related thread, the transformat...
I am looking for a good textbook (or other resource) that covers the analysis of satisfaction data. Most of my data uses likert-type scales. Can anyone recommend something with examples?
I am estimating a model for an assignment, and found out that there is a 0.9 correlation between two of the independent variables. So If I am not wrong I should omit one variable and redo the regression. However, it is asked to me, to estimate the log-log model and then the correlation between variables drop from 0.9 t...
At what point can very large samples, as a proportion of the population, be treated as a census? For example, if your sample contains 90% of the population units, can one dispense with inferential statistical inferences? What about 80%? And so on . . ..
In general, how many points are needed to estimate a p-dimensional covariance matrix? Does it depend on how the data are spread out across the different dimensions? Does it depend on the true distribution of the data? Thank you!
I am a middle school teacher. My district prides itself on having the kids take 3 tests during the year to predict their score, and my teaching, on "the real test" at the end of the year. My question: Is this practice even real? Or is the district fooling themselves in thinking these numbers mean more than what they do...
I have training arff file, and also I have instances data at hand. Now I want to add the instances data onto another file, called test file, and this test file has the same relation header and attribute with previous training file. How to realize that?
I am working on a project where I have to separate base and promotional volume from the sales data. I have sales data for the last 4 years at week level. How can I separate base and promotional volume from only this much data? Is it possible to do by regression or any time series approach? I'd appreciate any feedback. ...
in my thesis i had a significant interaction effect between two variables and their main effect is insignificant. A variable had a p-value of 0.636 B variable had a p-value of 0.219 A*B had a p-value of 0.022 A is employee training practices, B is Autonomy, and the response is explicit knowledge creation. my thesis is ...
I have two bacterial markers, I'll just call them X and Y. X codes for virulence, whereas Y just indicates the bacteria is present. Consequently, X will not show up without Y although not all bacteria have X. Both also have a detection limit, although I only care about the detection limit for X because I want to know t...
When an observation $x$ is generated by $P(x|\theta)$ for a parameter $\theta$ the Bayesian optimal estimator for the value of $\theta$ is $\hat\theta_{BEST}=\mathbb{E}[\theta|x]=\frac{1}{P(x)}\int d\theta P(\theta)P(x|\theta)$. Now assume that instead of using $P(x|\theta)$ in the above formula we have $Q(x|\theta)$ ...
By regularization techniques I'm referring to lasso, ridge regression, elastic net and the like. Consider a predictive model on health care data containing demographic and diagnosis data where length of stay for inpatient stays is being predicted. For some individuals there are multiple LOS observations (i.e., more tha...
I learned that for an AR(1) model $x_n = b + \phi x_{n-1} + a_n$ with $|\phi| < 1$ and $a_n \sim WN(0, \sigma_a^2)$, the covariance between $x_n$ and $x_{n+h}$ is $$ \mathrm{Cov} (h) = \frac{\sigma_a^2 \phi^h}{1 - \phi^2}$$ Now I would like compute the variance of the sample mean $$ \mathrm{Var}\frac{\sum_{i=1}^n x_i}...
My sample is 60 participants. At first, I did not expect to analyze the correlation, but the result is interesting, so I would like to. The 60 participants are 50 people who have good reading skill AND another 10 people who have poor reading skill. They took a test for which the full score = 7. The good reading skill g...
I'm trying to do some modelling of time to event data and for various reasons, the Aalen additive model seems promising. I'm using the aareg function in the survival package, but I'm struggling to find much literature (that isn't paywalled) to get more of a feel for the procedure. Does anyone have any suggestions of so...
I'm surprised I haven't run into this question yet, but I was wondering if there is a sound way of testing the difference in predicted means between two points on the same slope. For example: Let's say my predictor is the age of a car, and my predicted variable, its price. Let's assume that the downward slope is signif...
In Mostly Harmless Econometrics, section 5.2.1 (Regression DD), pages 233-234, equation (5.2.3) defines $Y_{ist}=\alpha + \gamma NJ_{s}+\lambda d_{t}+\delta (NJ_{s}.d_{t})+\epsilon_{ist}$, where $NJ_{s}$ is a dummy denoting observations from New Jersey and $d_{t}$ is a dummy for observations obtained in November. Consi...
I mean something like this chart showing the frequencies of a user's public contributions on GitHub. I really like this kind of chart, as I think that they display the intended data in a really nice and easy to see way, but I have no clue what they are called, so I can't look for a library to help me generate them. Ca...
I have 4 triplicate data values. each consist of 3 values, for example, this could be 1: Concentration: 45 78 66 These data have a mean of 63 and a st.dev. of 16.7 Now I have 4 similar triplicates, from multiple tests, for example: test: a b c d 45 56 34 67 78 23 67 34 ...
I've seen that multiplicative Holt-Winters requires strictly positive data points. I was wondering why it does not allow zero values?
Is there anything wrong with modeling zero-containing non-negative data by first multiplying it by 10^something, then rounding it, and then modeling it as poisson (or negative binomial)? In my case, I've got data on crop yields that includes complete crop failures, and response vs fitted plots (from OLS) show a lot of...
I have been studying statistics for the past two years. Almost everything I have learnt is about parametric statistics. Now I would like to learn more about non-parametric statistics. Can anyone suggest some concise (perhaps readable as well) introduction into this area?
This might sound a little silly to ask, but I couldn't figure out how an author arrived to the prior variance estimates from this vector: x <- c(5,3,5,1,2,4) y <- c("Lab", "Lib", "Cons", "Other", "None", "Swing") I see how he computed the mean: m = (x/sum(x)) Resulting in the following vector of Prior Means: m ...
For training a Machine learning model, I have 3 datasets: Training Validation Testing Normally I obtain there by dividing up the full dataset into pieces. I've created a function in my code to return the 3 of them in a record (ie named tuple, ie structure) an I need a name to refer to the grouping of the 3. Current...
I have two time-series. Data have been logged over time for two different objects. Is there a significance test, applicable in SPSS or Minitab, that can be used to determine whether there is a significant difference between my objects? The data are acquired at the same frequency.
Whats the probability of 3 brothers being born on the same day of the month in 3 different months? I ask because I'm one of them. Its April, May, and October 12th. What's the difference including whether or not we'd be male/female?
Input: $k$ vectors $x^1,\ldots,x^k \in \mathbb{R}^n$, where $x^i \sim \mathcal{N}(x,\mathbb{1} \cdot \sigma_i^2)$. Goal: approximate the vector $x$ as well as possible. The quality of approximation is measured in any reasonable metric such as $\mathbb{L}_1$ norm or Pearson correlation. Note that the values of $\sigma_i...
Given a linear regression model with all the assumptions checked and validated, I would like to obtain the probability that $Y>y|X=x$. For example for the iris dataset, I would do the following to obtain the probability of $Y>5|X=1,2,3...7$: plot(Sepal.Length~Petal.Length, data=iris) lm1<-lm(Sepal.Length~Petal.Length, ...
I have been using z-scores by subtracting the mean (and then dividing by the SD) of the sample, whereas I recently read they actually need to be the population mean and SD. Assuming you are transforming raw scores to z-scores in order to compare within-sample variables (various test scores of the same sample of subject...
It is easy to estimate a Poisson regression model using the Newton–Raphson Iterative Technique as it only involves one parameter (mu). However, I am unable to understand how a negative binomial regression model can be estimated using the Newton–Raphson Iterative Technique, as it involve two parameters (mu and dispersio...
My honours thesis is due in soon and I still haven't thought of a great title. I want something that's clever (perhaps using a pun or two), but also gives insight into what I'm doing. Preferably in the form of "Thesis: A Brilliant Thesis" Everyone loves colons. So what is my thesis about? It is a statistical dissertati...
When trying to fit a AR(p) model to a time series in R, it seems that both ar.ols() and arima() will work. Is there some consideration of when to use which then? ar.ols() seems to use least square estimation, while arima() uses maximum likelihood or minimize conditional sum-of-squares (default method). Is minimizing co...
I have the time-series data for a lot of stocks from their specific groups (market indices), and I would like to perform some quantitative tests on them as a group. Let's say for example I have 30 stocks over a period of 10 years with daily information. It is stored as a cell (in Matlab) so basically a matrix with 30 c...
I need to do data fitting to find the distribution of given data. I need to find the PDF function of the distribution. I can use data fitting functions in MATLAB and Python. It looks like a truncated gamma. What if the data cannot fit the truncated gamma well? The QQ-plot (quantile-quantile) shows that truncated gamma...
What is the difference between "data mining" and "data analytics"? Are both things the same technically?
I need to develop an algorithm that will compare two signals and generate some metric(s) to describe changes between them. Signal processing and analysis isn’t my strong point so I would appreciate any help! Here is an example of what the signals look like: The signal starts at a constant amplitude, then transitions i...
I'm trying to find the MAP estimate for a model by gradient descent. My prior is multivariate Gaussian with a known covariance matrix. On a conceptual level, I think I know how to do this, but I was hoping for some help with the details. In particular, if there is an easier way to approach the problem, then that woul...
I have been told $x$ is drawn from a symmetric triangle distribution. If the lower bound is 3 and the median is 9, how do I calculate the upper bound? I'm not sure which value to use (I have to substitute the value I find into a formula). I was thinking if perhaps I had the upper bound, lower bound and median. I could...
I have individual panel-level data and am using conditional binomial fe logit regressions to estimate the effect of minimum wage on Employment. 1) When I try to include year dummies most of them are excluded due to multicollinearity. I have tried evertying - dropping variables, changing the values of the year dummies ...
I have seen several texts that assert that for left-tailed and right-tailed tests, $H_0$ should be specified only in the form of, for example, $H_0: \mu = x$. The rationale for this seems to be that it is superfluous to say $H_0: \mu \leq x$ or $H_0: \mu \geq x$ because the definition of the $H_A$ (using $<$ or $>$) a...
How do I estimate the residual $\varepsilon_{t}$ of a Seasonal ARIMA model $\hat{Y}_t=\hat{\phi}{Y}_{t-1}+\hat{\Phi}{Y}_{t-12}+\varepsilon_{t}$? If the MSE is 0.114, what does it mean?
I achieved a strong linear relationship between my $X$ and $Y$ variable after doubly transforming the response. The model was $Y\sim X$ but I transformed it to $\sqrt{\frac{Y}{X}}\sim \sqrt{X}$ improving $R^2$ from .19 to .76. Clearly I did some decent surgery on this relationship. Can anyone discuss the pitfalls o...
Before fitting a linear mixed model, can any plots be used to show a random intercept/slope is justifiable in the model? I.e. these plots may indicate a different pattern for each individual over time. After fitting a linear mixed model, what diagnostics can be performed to see if any model modification is needed?
I want to fit an ARMA model on a time series (quarterly log returns of a 10 year bond) using MATLAB R2012b. This is part of an exercise. I have problems with the code and the interpretation of a result. This is the code I'm using: % last element is the most recent one, first element is the oldest one timeSeries = ... ...