similar to: Calling C function in R

Displaying 20 results from an estimated 5000 matches similar to: "Calling C function in R"

2004 Aug 30
3
Multiple lapply get-around
I am faced with a situation wherein I have to use multiple lapply's. The pseudo-code could be approximated to something as below: For each X from i=1 to n For each Y based on j=1 to m For each F from 1 to f Do some calculation based on Fij Store Xi,Yj = Fij End For F End for Y End for X Is there anyway to optimize the processing logic further? I *guess* using the multiple lapply
2004 Apr 20
2
Rank - Descending order
Dear All, Is there any simple way to way to produce "rank", for a given list, but in a descending order? E.G: x = list(a=c(1,5,2,4)); rank(x$a); produces 1,4,2,3 However I am looking for a way to generate (4,1,3,2). It would be particularly nice if the proposed solution has all the niceties of rank function (like NA handling and ties.method functionality) TIA Manoj
2004 Jun 09
1
Multiple regression
Hi, I am trying to do multiple regression on a set of data using backward stepwise regression....however backward stepwise regression is critised for overfitting data. To actually observe the bias and to come up with a better method to use..Could you all stats experts kindly give me pointers to any alternative procedure (or references) to use over backward stepwise regression from your
2004 Nov 19
2
Performing regression using R & C
Dear All, Is it possible to perform OLS using C code? I am trying to optimize a n-period "moving window" OLS on a huge dataset hence was wondering if such a thing is possible. Ideally the solution that I am looking for would involve a C-code accepting two float arrays and returning back computed parameters such as t-stat, coefficient etc. I have glanced thru the FAQ's and tried
2006 Aug 28
1
Help on function adf.test
Hello everybody, I've got a matrix called EUROPEDATA and I want to calculate the adf test statistic (part of the tseries package) on a rolling basis for window my.win on each column; i.e. each column of EUROPEDATA represents a particular variable; for the first column I calculate the adf test statistic for window my.win = 60 for example, roll forward one observation, calculate the adf
2011 Nov 13
1
Function not found, maybe respective package has to be put in environment?
Hello everybody, I have a problem and would like to start with an example: library(snow) library(tseries) fn <- function(x) adf.test(x) clusterApply(cl=cl, x=x , fun=fn) R cannot find the function adf.test() because it is inside the function fn(). This problem does not occur when, for example, fn <- function(x) mean(x) holds. Therefore, I think the package tseries has to be put somehow
2003 Oct 20
4
Processing logic for Huge Data set
Hello All, I am new to R. I am trying to process this huge data set of matrix containing four columns, say x1, x2, x3, x4 and n number of rows. I want to aggregate the matrix by x1 and perform statistic based on columns x2, x3, x4. I tried aggregate function but it gave me memory allocation error (which I am not surprised), so I ended up performing a for loop based on x1 and
2003 Jun 03
1
tseries "adf.test"
I have a question regarding the adf.test command in the tseries library. I have a vector of time series observations (2265 daily log prices for the OEX to be exact). I also have this same data in first-differenced form. I want to test both vectors individually for staionarity with an Augmented Dickey-Fuller test. I noticed when I use the adf.test command from the tseries library, the general
2007 Jan 18
2
problem in adf command
this command is used in tseries adf.test(x, alternative = c("stationary", "explosive"), k = trunc((length(x)-1)^(1/3))) this command apply adf test on data given in x .here general equatiuon that is, equation with constant and trend is used.if i did not include constant or trend in the equation and run the command then how i can run this command in tseries.
2010 Oct 29
3
Dickey Fuller Test
Dear Users, please help with the following DF test: ===== library(tseries) library(timeSeries) Y=c(3519,3803,4332,4251,4661,4811,4448,4451,4343,4067,4001,3934,3652,3768 ,4082,4101,4628,4898,4476,4728,4458,4004,4095,4056,3641,3966,4417,4367 ,4821,5190,4638,4904,4528,4383,4339,4327,3856,4072,4563,4561,4984,5316 ,4843,5383,4889,4681,4466,4463,4217,4322,4779,4988,5383,5591,5322,5404
2009 Jun 05
1
ADF test
Hi, While doing the ADF test in R using the following command I am getting the error and the result.."> x.ct=ur.df(rev$REVENUE,start=1,end=length(rev$REVENUE),frequency=1) Error in ur.df(rev$REVENUE, start = 1, end = length(rev$REVENUE), frequency = 1) : unused argument(s) (start = 1, end = 4, frequency = 1) >
2013 Jun 23
1
Scaling Statistical
Short question: Is it possible to use statistical tests, like the Augmented Dickey-Fuller test, in functions with for-loops? If not, are there any alternative ways to scale measures? Detailed explanation: I am working with time-series, and I want to flag curves that are not stationary and which display pulses, trends, or level shifts. >df DATE ID VALUE2012-03-06 1
2011 Jun 06
2
Problem in R documentation
I am not able to run Dickey-Fuller test. adf.test() function is not working. It is showing 'Error: could not find function "adf.test" Can any tell how to call "time series" library? -- Siddharth Arun, 4th Year Undergraduate student Industrial Engineering and Management, IIT Kharagpur [[alternative HTML version deleted]]
2004 Jun 14
2
CVnn2 + nnet question
Hi, I am trying to determine the number of units in the hidden layer and the decay rate using the CVnn2 script found in MASS directory (reference: pg 348,MASS-4). The model that I am using is in the form of Y ~ X1 + X2 + X3... + X11 and the underlying data is time-series in nature. I found the MASS and nnet package extremely useful (many thanks to the contributors). However I am getting
2013 Mar 22
4
error while extracting the p-value from adf.test
Hello all, I tried to extract the p-value from adf.test in tseries; however, I got the error message such as > ht=adf.test(list.var$aa) > ht$p-value Error in ht$p - value : non-numeric argument to binary operator > ht Augmented Dickey-Fuller Test data: list.var$aa Dickey-Fuller = -2.3147, Lag order = 4, p-value = 0.4461 alternative hypothesis: stationary > ht$data [1]
2009 Apr 01
1
Learning development concepts in R for newbie users
Hi R users, I apologize for a seemingly trivial question, but I felt this forum would be the best place to seek advice. I have been an R user for a year now, but I am limited to using R and its various contributed packages. I strongly feel that users of a free and open source software tool must eventually provide development expertise. I am aware of the extensive documentation available on the
2004 Jan 13
3
How can I test if a not independently and not identically distributed time series residuals' are uncorrelated ?
I'm analizing the Argentina stock market (merv) I download the data from yahoo library(tseries) Argentina <- get.hist.quote(instrument="^MERV","1996-10-08","2003-11-03", quote="Close") merv <- na.remove(log(Argentina)) I made the Augmented Dickey-Fuller test to analyse if merv have unit root: adf.test(merv,k=13) Dickey-Fuller = -1.4645,
2008 Dec 08
1
About adf.test
Dear sir, I am a new user of R statistical package. I want to perform adf.test(augmented dickey fuller test), which packages I need to install in order to perform it. I am getting following message on my monitor. *x<-rnorm(1000) > adf.test(x) Error: could not find function "adf.test" *I am waiting for your response. Kamlesh Kumar. -- Kamlesh Kumar Appt. No. - QQ420,
2008 Jan 10
1
question regarding kpss tests from urca, uroot and tseries packages
Hi R users! I've come across using kpss tests for time series analysis and i have a question that troubles me since i don't have much experience with time series and the mathematical part underlining it. x<-c(253, 252, 275, 275, 272, 254, 272, 252, 249, 300, 244, 258, 255, 285, 301, 278, 279, 304, 275, 276, 313, 292, 302, 322, 281, 298, 305, 295, 286, 327, 286, 270, 289, 293, 287,
2010 Aug 23
1
Dickey–Fuller test in R
Hi, While doing the adf test using ur.df ?price.df2=ur.df(y=log(price),type = "drift", selectlags="AIC") summary(price.df2)? It gives two values for ?value of test statistic is: -1.5992?? 2.32? one value is the t-test (or t-ratio), what is the other one? Please help. TIA Aditya