TutorTeddy.com, Tutoring, Dallas, TX
Like us for free help*

Data Handling in R



Ask any Statistics/Probability/Math Question

What is A Time Dependent Data?

By time dependent data we mean Time Series Data. Time Series models can be both stationary and non stationary and also it can perform both univariate and multivariate analyses. First a model is selected and fitted and then the estimates of the parameters based on the model are obtained. Time Series assists in making estimates of the model parameters as soon as you fit the model. Moreover the validity of the model can also be checked and verified with the help of Time Series. Validity can be checked either by the residuals or with the help of the following tests:


  • Difference-sign
  • Portmanteau etc.

Also prediction and forecasting can also be made with the help of Time Series. The forecasting technique includes BLP( Best linear predictor) ,approximate best linear predictor etc. Predictions can be updated by collecting new data. Moreover analysis of data in frequency space can also be performed through time series. In Time Series the spectral analysis is done with the help of Fourier transformation, etc.


Time Dependent Data

How to Handle Time Dependent Data in R

Here we are concerned with study relating to time i.e the study which is time dependent. This implies in the data all the observations have a attached time tag. Such data is termed as time series data. The order is different for different cases of the time series data.


Time Series comprises of a set of ordered observations of a variable Y : y1,….,yt-1,yt,yt+1,…,yn.


Where yt denotes the value of the series variable Y at time t.

In time series analysis the main motivation is to obtain a model that is based on the observations of the variable,y1,….,yt i.e, the past observations. This also helps and permits you to predict future observations of the variable: yt+1,…,yn..Considering the case of Stock data we deal with multivariate time series which measures numerous variables with the same time tag . The variables in Stock data includes Open, High ,Low, Close, Volume, and Adjusted Close. There are several packages in R which performs analysis of such data.


R also has facilities like special plotting functions etc. related with such data.

How to create objects:


The following is an example which tells us how are the objects of time series created in R:


> library(yts)


>y1<- yts(rnorm(), seq(),len=, y=))


>y1[1:5]


>y2<-yts(rnorm(),seq(),len=,y=))


>y2[1:4]


Like this y3,y4,y5 ,…etc.


For multivariate :


> mts.vals<-matrix(round(rnorm())>colnames(mts.vals)<-paste())


>mts<-xts(mts.vals,as.()))

>mts

Time Series

To extract time tag information functions index() and time () are used. The function coredata() allows to get the values of the time series data.


Thus vast stock data can be stored .The reason is that R allows to store multiple time series.


Time Series Analysis

TutorTeddy.com & Boston Predictive Analytics

[ Email your Statistics or Math problems to tutor@aafter.com (camera phone photos are OK) ]


Boston Office (Near MIT/Kendall 'T'):
Cambridge Innovation Center,
One Broadway, 14th Floor,
Cambridge, MA 02142,
Phone: 617-395-8864


Dallas Office (Near Galleria):
15950 Dallas Parkway,
Suite 400,
Dallas, TX 75248,
Phone: 866-930-6363

Copyright © 2011 tutorteddy.com. All Rights Reserved. | By using our site, you agree to our TOS.