[R] Markov Switching

2009-09-22 Thread Angel Spassov
DeaR list, I am looking for a descent implementation of a frequentist estimation of a standard Markov Switching Vector Autoregressive Model. Until now I found the following packages: 1) MSBVAR: It seems that this package estaimates Markov-Switching VAR-model only from a Bayesian point of

Re: [R] lag a data.frame column?

2009-09-10 Thread Angel Spassov
Mark Knecht wrote (09.Sep.2009 at 10:43 -0700): > Sometimes it's the simple things... > > Why doesn't this lag X$x by 3 and place it in X$x1? (i.e. - Na's in > the first 3 rows and then values showing up...) > > The help page does talk about time series. If lag doesn't work on > data.frame column

[R] : source R-script interactively outside R

2009-08-16 Thread Angel Spassov
DeaR list, let us assume we have stored a couple of functions in 'test.R'. Is it possible to run R CMD BATCH "test.R" or R --file="test.R" interactively and if yes how? A better formulated question sounds like this: how can I source "test.R" interactively OUTSIDE R? Another clarification try:

[R] tcltk in BATCH mode

2009-08-12 Thread Angel Spassov
DeaR list, I am writing a user friendly script for an interactive use of R. The user is supposed to click on a bat-File in Windows-environment and to enter some values in a pop-up window. Let us assume we have the script given below. If she sources this script within R, everything works smoothly.

Re: [R] R: extract data.frames from a list

2009-07-17 Thread Angel Spassov
Right on target! Very appreciated. Thanks. Cheers, AS On Fri, Jul 17, 2009 at 4:39 PM, Henrique Dallazuanna wrote: > do.call(rbind, tmp) > > On Fri, Jul 17, 2009 at 10:55 AM, Angel Spassov > wrote: > >> Dear useRs and developeRs, >> >> I am struggling with a

[R] R: extract data.frames from a list

2009-07-17 Thread Angel Spassov
Dear useRs and developeRs, I am struggling with a simple but not obviously solvable issue. Suppose I have the following list of data.frames called 'tmp': a <- data.frame(a=rnorm(10),b=letters[1:10]) (tmp <- list(a,a[1:4,],a[1:7,])) It is known that all data.frames in this list have the same numb

[R] gamboost partial fit prediction

2008-10-15 Thread Angel Spassov
Dear useRs, I am struggling to use gamboost function form the 'mboost' package. More precisely, I am trying to extract the *partial fit* for each of the covariates estimated in a model and I usually end up with this annoying: "Error in newdata[[xname]] : subscript out of bounds ". I hope that the

[R] 'as.Date' conversion of classes POSIX*t (problem/feature)?

2008-07-03 Thread Angel Spassov
Hi, I'm working with objects of classes "Date","POSIXlt" and "POSIXct" and still having some Date/Time-related concepts unclear. In the documentation of "as.Date" one can find: "The 'as.Date' methods accept ... '"POSIXlt"' and '"POSIXct"'. (The last are converted to days by ignoring the time afte