similar to: Confusion in 'quantile' and getting rolling estimation of sample quantiles

Displaying 20 results from an estimated 700 matches similar to: "Confusion in 'quantile' and getting rolling estimation of sample quantiles"

2010 Jan 11
3
Problem about Box-Cox transformation (topic in html form)
Hi: Recently, I want to perform a transformation on my data to make it more normal, meanwhile the order statistics is unchanged. So I decided to use a box-cox transformation. below is the qq-plot of the original data http://n4.nabble.com/file/n1011015/start%2Bvalue%2Bproblem%2B02.jpeg Note that the min of my data is -1099, so I add a fix value 1200 to the original sample. I choose the
2010 Aug 14
3
How to perform a substitution in a loop?
Hello all: I have a data series of 500 data, and I want to limit the value of it to be less than 1. Below is my code: >for (i in 1:500) +if( x[i] > 1) +x[i] = 1 but the system told me it's wrong. Can anyone told me the reason? ----- ------------------------------------------------------------------ Saji Ren from Shanghai China GoldenHeart Investment Group
2009 Nov 27
2
How to compute Rolling analysis of Standard Deviation using ZOO package?
Hello: I want to get a rolling estimation of the stdev of my data. Searching the document, I found the function "rollapply" in the zoo package. For example, my series is "c", and i want get a period of 10 days, so i write the command below: roll.sd = rollapply( c, 10, sd, na.pad = TRUE, align = 'right' ) but there is an error in it ,and the computing cannot be
2010 Jan 03
6
Help with function "fitdistr" in "MASS"
Hi, R users: I want to fit my data into a normal distribution by using the command "fitdistr" in "MASS". I changed my data class from "ts" to "numeric" by >class(mydata)="numeric" but after using "fitdistr", I got the result below >fitdistr(mydata,"normal") mean sd NA NA (NA) (NA) the help doc of
2009 Feb 03
3
Problem about SARMA model forcasting
Hello, Guys: I'm from China, my English is poor and I'm new to R. The first message I sent to R help meets some problems, so I send again. Hope that I can get useful suggestions from you warm-hearted guys. Thanks. I builded a multiplicative seasonal ARMA model to a series named "cDownRange". And the order is (1,1)*(0,1)45 The regular AR=1; regular MA=1; seasonal AR=0; seasonal
2009 Jul 07
1
Error in Rolling window of function - rollapply
Dear Colleagues, I have faced with the problem that function rollaply with rolling window for calculation of volatility doesn't give the all results of calculations. I have run the rolling window for calculation in Excel and obtained that the number of outputs for Excel is 36 and for R is 18. The total number of observations is 37. In the attachment you can find pdf of the Excel and Excel
2011 Mar 04
2
apply.rolling() to a multi column timeSeries
Hello there, I am trying to compute the 3 months return momentum with the timeSeries x.ts, which is just a subset of simple returns from a much bigger series, > class(x.ts) [1] "timeSeries" attr(,"package") [1] "timeSeries" > dim(x.ts) [1] 20 3 > x.ts[1:8,] GMT MS.US AAPL.US CA.FP 1996-01-31 0.15159065 -0.133391894
2011 Oct 03
2
rolling regression
Dear all, I have spent the last few days on a seemingly simple and previously documented rolling regression. I have a 60 year data set organized in a ts matrix. The matrix has 5 columns; cash_ret, epy1, ism1, spread1, unemp1 I have been able to come up with the following based on previous help threads. It seems to work fine. The trouble is I get regression coefficients but need the immediate
2008 Jul 29
1
rolling regression between adjacent columns
Hi everyone, I am trying to apply linear regression to adjacent columns in a matrix (i.e. col1~col2; col3~col4; etc.). The columns in my matrix come with identifiers at the top of each column, but when I try to use these identifiers to reference the columns in the regression function using rollapply(), the columns are not recognised and the regression breaks down. Is there a more robust way to
2007 Nov 30
1
Rolling Correlations
Hi R, I want to do some rolling correlations. But before, I searched for "?rollingCorrelation" and tried the example in it. But I was not successful. What could be the problem? Here is the code I tried: > library(zoo) > library(PerformanceAnalytics) > rollingCorrelation(manager.ts@Data[,1],edhec.ts@Data,n=12) Error in inherits(object, "zoo") : object
2012 May 25
1
Rolling Sample VAR
hi guys, I am using trivariate VAR model to get 10 step ahead orthogonalized impulse response functions. I want to use rolling sample analysis on the coefficients of the irf but I have no idea how to do that. I looked through the forums but I can't seem to find any solutions. Any suggestions would be helpful. B -- View this message in context:
2017 Aug 10
2
Zoo rolling window with increasing window size
Hi again, I am wondering there is any function for 'zoo' time series, where I can apply a user defined function rolling window basis, wherein window size is ever increasing i.e. not fixed. For example, let say I have below user defined function and a zoo time series : > library(zoo) > UDF = function(x) sum(x) > TS = zoo(rnorm(10), seq(as.Date('2017-01-01'),
2008 Feb 13
4
rolling sum (like in Rmetrics package)
Hello, I'm new to R and would like to know how to create a vector of "rolling sums". (I have seen the Rmetrics package and the rollMean function and I would like to do the same thing except Sum instead of Mean.) I imagine someone has done this, I just can't find it anywhere. Example: x <- somevector #where x is 'n' entries long #what I would like to do is: x1
2017 Aug 10
0
Zoo rolling window with increasing window size
Use a `width` of integer index locations. And you likely want = "right" (or rollapplyr(), as I used). R> set.seed(21) R> x <- rnorm(10) R> rs <- rollapplyr(x, seq_along(x), sum) R> cs <- cumsum(x) R> identical(rs, cs) [1] TRUE On Thu, Aug 10, 2017 at 1:28 PM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote: > Hi again, > > I am
2006 Feb 08
3
difference between rnorm(1000, 0, 1) and running rnorm(500, 0, 1) twice
Hi R users This looks a simple question Is there any difference between between rnorm(1000,0,1) and running rnorm(500,0,1) twice in terms of outcome ? TM
2010 Aug 18
2
Rolling window linear regression
Hi Does there exists an efficient way of performing linear regression on rolling windows in R. The exact problem is: We have a dataset of length l. The window size is w. Now, I perform linear regression on window i to (i+w) . Using this model can I perform linear regression over window (i+1) to (i+w+1). Thanks Sid Sent on my BlackBerry? from Vodafone
2017 Aug 10
3
Zoo rolling window with increasing window size
Hi Joshua, thanks for your prompt reply. However as I said, sum() function I used here just for demonstrating the problem, I have other custom function to implement, not necessarily sum() I am looking for a generic solution for above problem. Any better idea? Thanks, On Fri, Aug 11, 2017 at 12:04 AM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote: > Use a `width` of integer index
2017 Aug 10
0
Zoo rolling window with increasing window size
Replace "sum" with your custom function's name. I don't see any reason why that wouldn't work, and the problem with my solution is not clear in your response. r <- rollapplyr(x, seq_along(x), yourCustomFunctionGoesHere) On Thu, Aug 10, 2017 at 1:39 PM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote: > Hi Joshua, thanks for your prompt reply. However
2010 May 06
1
question about rolling regressions
Hi All, I am using R 2.11.0 on a Ubuntu machine. I have a time series data set and want to run rolling regressions with it. Any suggestions would be useful. Here are the details: (1) I convert relevant variables into time series objects and compute first differences: vad <- ts(data$ALLGVA/data$GDPDEF, start=1948, frequency=1) emp <- ts(data$ALLEMP, start=1948, frequency=1) vad.dif1 <-
2011 Oct 10
1
how to calculate the statistics of a yearly window with a rolling step as 1 day?
Hope someone can help me here. I have a daily time series, say 2003-02-01 2003-02-03 2003-02-07 2003-02-09 2003-02-14 .......... 2004-02-01 2004-02-04 0.4914798 -1.1857653 -1.6982844 -0.3559572 -0.2333087 ........... 0.44553 -0.45222 I need to calculate the statistics for the overlapping rolling yearly window with rolling step as 1 day so for each of the intervals: (2003-02-01 ~