search for: kerpel

Displaying 20 results from an estimated 25 matches for "kerpel".

Did you mean: kernel
2006 Jun 21
5
colClasses
Hi Folks! I'm reading in some data from a .csv file that has a date column. How do I use colClasses to get read.csv to recognize the date column? The documentation on this seems to be nil - And yes, I've read help and R Data Import/Export and can't figure out what the colClasses syntax is. Thanks, john [[alternative HTML version deleted]]
2006 May 15
3
Dyn or Dynlm and out of sample forecasts
All: How do I obtain one step ahead out-of-sample forecasts from a model using "dyn" or "dynlm" ? Thanks! Best, John [[alternative HTML version deleted]]
2006 Jun 23
3
Problems with weekday extraction from zoo objects
Hi Folks! I'm struggling with dates - but enough about my personal life..... I have two daily time series files. In one (x) the date format is Y/m/d and the other (y) is d/m/y. I used read.zoo on both and they read into R with no problem. Then I use: weekdays(as.Date(x$DATE)) and get what I expect - all the days of the week in my data set. When I use:
2008 May 02
2
Extract lags from a formula
Hi folks! How do I extract lags from a formula? An example: mod.eq<-formula(x~lag(x,-1)+lag(x,-2)) > mod.eq x ~ lag(x, -1) + lag(x, -2) > mod.eq[1] "~"() > mod.eq[2] x() > mod.eq[3] lag(x, -1) + lag(x, -2)() I'm trying to extract the lags into a vector that would be simply [1,2]. How do I do this? I'm using the dyn package to do dynamic
2008 Aug 01
3
Reading data in R-metrics
Hi Folks! I used the code below previously with no problems, but now I get: DTB3<-read.table("C:\\Program Files\\R\\R-2.7.1\\DTB3.csv",header=TRUE,sep=",") > tail(DTB3) DATE VALUE 14233 2008-07-23 1.56 14234 2008-07-24 1.62 14235 2008-07-25 1.71 14236 2008-07-28 1.70 14237 2008-07-29 1.69 14238 2008-07-30 1.67 >
2009 Feb 12
2
System.time
Hi folks! Does anyone know why I might see something like this after running system.time? system.time(svd(Mean_svd_data)) user system elapsed 0 0 0 The data set is tiny and the function returns results instantly, but shouldn't it still give me a time? Thanks, John [[alternative HTML version deleted]]
2008 Jan 24
1
Error using Rmetrics to read data
Hi folks. This set of code used to work, but after upgrading to the latest version of Rmetrics it no longer does. Any ideas? SP500<-read.table("SP500.csv",header=TRUE,sep=",") > head(SP500) Date Open High Low Close Volume Close2 1 8/4/2006 1280.26 1292.92 1273.82 1279.40 2530970112 1279.40 2 8/3/2006 1278.22 1283.96 1271.25 1280.27
2008 Jul 02
1
Multiple time series plots
Hi all: I'm trying to plot two time series created in Rmetrics and label the x-axis with dates. I tried the following: dates <- as.Date(seriesPositions(x.agg)) r <- as.Date(range(dates)) ts.plot(x.agg@Data[,c(1,5)],gpars=list(ylab="Volume", lty=c(1:2),xaxt="n",main="Plot of Volume")) axis.Date(1, at=seq(r[1], r[2], length.out=10),
2008 Dec 16
1
Problem with alignDailySwries in R-metrics
Hi Folks! I seem to be having a problem with alignDailySeries in Rmetrics: DTB6<-fredSeries("DTB6",frequency = "daily",from = "1980-01-01") trying URL ' http://research.stlouisfed.org/fred2/series/DTB6/downloaddata/DTB6.txt' Content type 'text/plain; charset=UTF-8' length 248392 bytes (242 Kb) opened URL downloaded 242 Kb Read 13060 items
2011 May 12
1
do.call and applying na.rm=TRUE
Hi all! I need to do something really simple using do.call. If I want to call the mean function inside do.call, how do I apply the condition na.rm=TRUE? So, I use do.call(mean, list(x)) where x is my data. This works fine if there are no NAs. Thanks, John [[alternative HTML version deleted]]
2012 Mar 05
1
VAR with GARCH effect
Dear list, Can one suggest me if there is an R function/package to estimate and simulate vector autoregressive (VAR) model allowing for the GARCH effect please? Thanks Mamush [[alternative HTML version deleted]]
2012 May 25
1
question about TryCatch and lapply
Folks: I've replaced an outer for-loop with lapply and it works great. But, I can't seem to do the following type of exception handling: tryCatch(dlmMLE(x)$value==Inf,error = function(e) NULL) which basically says if the likelihood is Inf, throw an error. But what I want it to do is just go to the next index in the list. When I was using a for-loop I used:
2012 Dec 12
2
Problem installing package "caret"
Folks: I keep getting the following error message (I'm on Windows 7, R-2.15.2, and tried a reboot...). Thx! John > install.packages("caret")Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’ (as ‘lib’ is unspecified)trying URL 'http://streaming.stat.iastate.edu/CRAN/bin/windows/contrib/2.15/caret_5.15-045.zip'Content type 'application/zip' length
2007 Nov 09
1
Problem reading data in Rmetrics
Hi folks - After upgrading to the latest version of Rmetrics, I can't read in data like I used to. Is anyone seeing the following? It seems to truncate the dates after I use "as.timeSeries". -John SP500<-read.table("SP500.csv",header=TRUE,sep=",") > head(SP500) Date Open High Low Close Volume 1 08/04/06 1280.26 1292.92
2012 Sep 11
1
Strange result from GAMLSS
Hi Folks! Just started using the gamlss package and I tried a simple code example (see below). Why the negative sigma? John > y <- rt(100, df=1)> m1<-fitDist(y, type="realline")Warning messages:1: In MLE(ll3, start = list(eta.mu = eta.mu, eta.sigma = eta.sigma, : possible convergence problem: optim gave code=1 false convergence (8)2: In MLE(ll4, start = list(eta.mu =
2006 May 16
1
Substitute and quotes
Hi folks! I'm trying to update a model using: form <- substitute(.~.-bad.var, list(bad.var=bad.var)) model.update<-update(model, form) where bad.var is a character string like lag(X1, 10) The problem is that substitute puts lag(X1, 10) in quotes - something I don't want it to do. It even does this if I use noquote(bad.var). Any suggestions around this? Thanks!
2006 Jun 09
1
Mod function?
Hi Folks! I need to execute a piece of R code inside a loop, say, every fourth time my counter increases (it increases by 1 unit each time.) Is there any sort of mod function in R to do this? Or is this done some other way? Many thanks! Best, john [[alternative HTML version deleted]]
2006 Aug 15
1
fMultivar OLS - how to do dynamic regression?
Hi folks! Does anybody know how to use the OLS function in fMultivar to do dynamic regression? I've tried specifying lags in OLS using a data series created in fSeries and it doesn't seem to work. I've done dynamic regression using dyn$lm and I was wondering how to accomplish the same thing using the OLS function from fMultivar. Thanks! John [[alternative HTML version
2009 Jan 14
1
Histograms: Boxes and lines
Hi folks! I'm trying to get a histogram legend to give me a filled box and a line. The problem is I keep getting both filled boxes and a line. How can I get rid of the second box from the code below? x<-rnorm(1000,mean=0,sd=1) hist(x, breaks = 50, main="Histogram of x",freq=FALSE, xlab=" x", ylab="Density",col="lightblue",
2009 Jan 14
1
Histograms: Lines and boxes
Hi folks! I'm trying to get a histogram legend to give me a filled box and a line. The problem is I keep getting both filled boxes and a line. How can I get rid of the second box from the code below? x<-rnorm(1000,mean=0,sd=1) hist(x, breaks = 50, main="Histogram of x",freq=FALSE, xlab=" x", ylab="Density",col="lightblue",