Re: [R] How to obtain seed after generating random number?

2010-08-27 Thread Paul Gilbert
It is nearly impossible to go back after the fact and figure out the seed you started with. So, you need to be careful to record the seed first. If you are doing your simulations with a function then it is a good idea to always start in the function by saving a record of the seed and returning it

[R] [R-pkgs] new dse package

2009-11-07 Thread Paul Gilbert
or dse2. I have also taken this opportunity to do a long overdue cleanup of the Users' Guides distributed as vignettes in the packages. Paul Gilbert La version française suit le texte anglais

Re: [R] Can RMySQL be used for a paramterized query?

2010-06-10 Thread Paul Gilbert
Ted I'm not sure I fully understand the question, but you may want to consider creating a temporary table with a join, which you can do with a query from your R session, and then query that table to bring the data into R. Roughly, the logic is to leave the data in the db if you are not doing

Re: [R] Error: X11 cannot allocate additional graphics colours.

2007-10-15 Thread Paul Gilbert
(This could be fixed, it has not happened to me in a long time, but I will mention it mainly because it is not something you are likely to think of.) It used to be that the X colours might be defined by the first application that needed them, so if the systems administrator happened to start

Re: [R] Multivariate time series

2007-11-12 Thread Paul Gilbert
Package dse does do linear, multivariate time series with multivariate exogenous inputs, using VAR, multivariate ARMA, and state-space models, just like you are describing. You can specify the model or have it automatically determined. Perhaps you could give a few more details about what you

Re: [R] kalman filter estimation

2007-11-15 Thread Paul Gilbert
or ARMA model and then convert it to a state space model, which was one of the original purposes of dse. (See ?bft for example.) Paul Gilbert - adschai __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] kalman filter estimation

2007-11-15 Thread Paul Gilbert
Giovanni Petris wrote: Kalman filter for general state space models, especially in its naive version, is known for its numerical instability. This is the reason why people developed square root filters, based on Cholesky decomposition of variance matrices. In package dlm the implementation

Re: [R] Using R in a university course: dealing with proposal comments

2008-02-11 Thread Paul Gilbert
that needs more emphasis is that R is actually a programming language, like Matlab and and APL, so it really has more general usefulness than statistics packages that one might use in the narrower context of a statistics course. Paul Gilbert

Re: [R] building packages for Linux vs. Windows

2008-02-11 Thread Paul Gilbert
this necessary, and ask if there is an OS independent way to do it. Paul Gilbert Would I be better off just to build two separate packages, please? If just one is needed, how could I determine which system is running in order to use the correct command, please? Thanks in advance, Erin

Re: [R] History of R

2008-02-22 Thread Paul Gilbert
resolved one of the big problems of Statlib: there is an automatic mechanism for removing broken and unmaintained packages. Paul Gilbert Kathy Gerber wrote: Earlier today I sent a question to Frank Harrell as an R developer with whom I am most familiar. He suggested also that I put my questions

Re: [R] dse model setup help

2009-07-17 Thread Paul Gilbert
I think the problem here is that you seem to be trying to specify a non-innovations form model, for which both Q and R need to be specified, but you have only specified Q. The code guesses whether you are specifying an innovations model or an non-innovations model based on whether you specify

Re: [R] using acf() for multiple columns

2008-08-11 Thread Paul Gilbert
problem is getting the data into R. Paul Gilbert Thanks, rcoder Ling, Gary (Electronic Trading) wrote: Hi, here is one possible solution ... -gary ### example ### # create a 500x3 multi-ts A - matrix(rnorm(1500),nrow=500) # misc. graphical setting par(mfrow=c(ncol(A),1)) # then our

Re: [R] dbConnect

2008-08-15 Thread Paul Gilbert
Christiane Reuter wrote: Hi everybody, I'm having a problem with connecting to my MySQL database. Each time I try to connect library(RMySQL) m - dbDriver(MySQL) con - dbConnect (m, host=my_host,username=my_username, password=my_password, dbname=name_of_db) it says Fehler in

Re: [R] Exception Handling

2008-07-07 Thread Paul Gilbert
time stamp in some parallel situations In this example I am assuming that printing z has zero length output if everything was ok, but you could set up different situations, and you will probably want to use try() in doSomething(). HTH. Paul Gilbert On Sun, Jul 6, 2008 at 7:36 PM, Tudor Bodea

Re: [R] NumDeriv - derivatives of covariance matrix

2008-04-30 Thread Paul Gilbert
that the matrix is symmetric. Paul Gilbert Daomeng Gao wrote: Hello R-help, I need to compute matrices of first derivatives of a covariance matrix C with entries given by c_ij=theta*exp(-0.5* sum(eta*(x[i,]-x[j,])^2)), wrt to elements of eta, a m-dimensional vector of parameters, given a n*m data matrix x

[R] remote browser and per-session dir

2009-05-06 Thread Paul Gilbert
), or some other fix for this feature? Paul Gilbert La version française suit le texte anglais. This email may contain privileged

Re: [R] SQL Queries from Multiple Servers

2009-05-14 Thread Paul Gilbert
Tom Schenk Jr wrote: I use RODBC as my conduit from R to SQL. It works well when the tables are stored on one channel, e.g., channel - odbcConnect(data_base_01, uid=, dsn=) However, I often need to match tables across multiple databases, e.g., data_base_01 and data_base_02. However,

Re: [R] 00LOCK error with site-library

2007-12-10 Thread Paul Gilbert
Mark W Kimpel wrote: I have identical R.profiles and R_HOME directories set up on both my local machine and a remote linux cluster. To keep my libraries and R install separate, I use a site-library on both machines. The first line of my .Rprofile is: '.libPaths(new=

Re: [R] R Compilation error on Ubuntu

2007-12-24 Thread Paul Gilbert
Taka You might want to try R-SIG-Debian for this kind of question. Here are instructions from Dirk in response to my similar question a few days ago. HTH, Paul _ On 12 December 2007 at 18:17, Paul Gilbert wrote: | I'm trying to build R from source on Ubuntu Gutsy Gibbon. I've

Re: [R] An R is slow-article

2008-01-09 Thread Paul Gilbert
should write everything in C People used to say assembler, that's progress. Paul Gilbert instead (mainly because R is slow and too good at graphics, encouraging data snooping). See http://fluff.info/blog/arch/0041.htm While I don't agree (granted, I can't really write C

Re: [R] things that are difficult/impossible to do in SAS or SPSSbut simple in R

2008-01-17 Thread Paul Gilbert
appreciate comments on the relative merits from anyone that has more experience in this area. Paul Gilbert Walter Paczkowski wrote: Good morning, I use SAS and R/S-Plus as my primary tools so I have a lot of experience with these programs. By far and away, SAS is superior for handling the messy

[R] Ottawa area R Users meeting

2008-11-05 Thread Paul Gilbert
There will be a meeting of the Ottawa Gatineau R Users Group on Monday November 10 from 4pm to 6pm. More details are provided below. Please pass this message along to friends you think may be interested. Paul Gilbert _ Dear R friends: To get OGRUG going again I've reserved room DMS

[R] [R-pkgs] Packages for time series databases

2008-11-18 Thread Paul Gilbert
thanks to the authors and maintainers of the underlying packages, and several people who have commented on early versions of the TS* packages. Paul Gilbert La version française suit le texte anglais

Re: [R] R ORM?

2008-11-19 Thread Paul Gilbert
Faheem Mitha wrote: Hi Hans, Thanks for the reply. On Tue, 18 Nov 2008, Hans Werner Borchers wrote: Faheem Mitha faheem at email.unc.edu writes: Hi, Does anyone know of an R ORM (Object Relational Mapper)? I'm thinking of something similar to sqlalchemy (http://www.sqlalchemy.org/).

Re: [R] windows vs. linux code

2009-02-26 Thread Paul Gilbert
Gabor Grothendieck wrote: Try if (.Platform$OS.type == windows) ... else ... Gabor has suggested what I think is the best way to do this check, but in my experience, if you are doing this check then you are almost certainly missing some feature of R that will let you avoid doing it.

[R] New international competition for the Digital Humanities

2009-01-23 Thread Paul Gilbert
(Slightly off topic and outside my area - but this may be of interest to the R community) WASHINGTON (January 16, 2009) -- Today, a new international competition called the Digging into Data Challenge was announced by four leading research agencies: the Joint Information Systems Committee

Re: [R] Reading dates in R using SQL and otherwise (and someinteresting behavior by the data editor)

2010-04-08 Thread Paul Gilbert
. Paul Gilbert -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Paul Miller Sent: April 8, 2010 11:14 AM To: r-help@r-project.org Subject: [R] Reading dates in R using SQL and otherwise (and someinteresting behavior by the data editor

Re: [R] a question on R optimization functions

2011-03-25 Thread Paul Gilbert
It seems more likely that the return value from your function is NA or NaN or Inf. This might then result in an NA parameter value being calculated for the next step. This is possible, for example, because the line search extends outside the feasible region. You can re-write your function to

Re: [R] Varma models in the dse package

2011-11-23 Thread Paul Gilbert
Tanja Your TSdata object dfdata as printed in your email looks a bit funny. It should be a list with a matrix of numeric data in the element named output: dfdata - TSdata(output=matrix(rnorm(200), 100,2)) dfdata output data: Series 1 Series 2 10.01905979 -0.096441240 2

Re: [R] simulating stable VAR process

2012-01-05 Thread Paul Gilbert
The simulate function in dse lets you specify the model and the distribution of the noise term (or even their values so you can get any distribution you like). So, you should be able to do what you want, with either a VAR(p) or a vector ARMA process. If you are getting a process that

Re: [R] The Future of R | API to Public Databases

2012-01-14 Thread Paul Gilbert
The situation for this kind of interface is much more advanced (for economic time series data) than has been suggested in other postings. Several of the organizations you mention support SDMX and I believe there is a working R interface to SDMX which has not yet been made public. A more

Re: [R] R-help Digest, Vol 107, Issue 14

2012-01-15 Thread Paul Gilbert
On 12-01-14 06:00 AM, r-help-requ...@r-project.org wrote: Date: Fri, 13 Jan 2012 02:09:09 -0800 (PST) From: statquant2statqu...@gmail.com To:r-help@r-project.org Subject: Re: [R] simulating stable VAR process Message-ID:1326449349804-4291835.p...@n4.nabble.com Content-Type: text/plain;

Re: [R] Question about R performance on UNIX/LINUX with, different memory/swap configurations

2012-09-17 Thread Paul Gilbert
On 12-09-17 06:00 AM, r-help-requ...@r-project.org wrote: Date: Sun, 16 Sep 2012 14:41:42 -0500 From: Dirk Eddelbuettele...@debian.org To: Eberle, Anthonyae...@allstate.com Cc:r-help@r-project.org Subject: Re: [R] Question about R performance on UNIX/LINUX with different

[R] Is there any package for Vector Auto-regressive with exogenous variable other than fastVAR?

2012-10-04 Thread Paul Gilbert
Package dse also does vector auto-regression with exogenous variables (and also vector ARMA and state-space models with exogenous variables). But I don't understand what you mean by not taking the base in the model so I don't know if it will solve your problem. Paul On 12-10-04 06:00 AM,

Re: [R] Date Math

2012-10-15 Thread Paul Gilbert
On 12-10-15 06:00 AM, r-help-requ...@r-project.org wrote: Jeff, My understanding is that the lag command will lag an entire time series. That isn't what I'm looking for. I just want, for example, today, and 5 entries back. for exmple: iter - '2011-05-18' observations[iter] # works

Re: [R] Problem connecting to database via RPostgreSQL/RS-DBI: could not connect error

2014-02-24 Thread Paul Gilbert
A post with subject Basic R to SQL considerations has been put on R-sig-DB to address some of the basic questions here. The R-sig-DB thread is not specific to RPostgreSQL. I have learned enough since this posting to be aware that my question was based on assumptions so false to fact that

[R] RODBC and PosgreSQL problems

2014-05-31 Thread Paul Gilbert
I'm not sure if this was due to mailer wrap, but I think you are putting a return between the end of the table name and the quote mark, and possibly that or a space is being included in the table name in the sqlQuery() statement. Do you have the same problem if you put the quote mark

Re: [R] Am I working with regularly spaced time series?

2013-10-22 Thread Paul Gilbert
On 13-10-22 06:00 AM, Weiwu Zhang zhangwe...@realss.com wrote: My data is sampled once per minute. At the same second each minute or not? Regularly spaced would mean exactly one minute between observations. There are invalid samples, leaving a lot of holes in the samples, successful

Re: [R] hessian fails for box-constrained problems when close to boundary?

2012-11-17 Thread Paul Gilbert
Matthieu (regarding the final question, but not the ones before that.) The short answer is that you seem to have a solution, since hessian in numDeriv works. The long answer follows. Outside a constraint area one cannot assume that a function will evaluate properly. Some constraints are

[R] creation of an high frequency series

2012-11-26 Thread Paul Gilbert
(from R-help Digest, Vol 117, Issue 26) Date: Sun, 25 Nov 2012 07:49:05 -0800 (PST) From: billycorgcandi...@gmail.com To:r-help@r-project.org Subject: [R] creation of an high frequency series Message-ID:1353858545067-4650744.p...@n4.nabble.com Content-Type: text/plain; charset=us-ascii Hi R

Re: [R] Should there be an R-beginners list?

2013-11-25 Thread Paul Gilbert
On 13-11-25 06:00 AM, r-help-requ...@r-project.org wrote: Date: Sun, 24 Nov 2013 13:04:43 -0600 From: Yihui Xiex...@yihui.name To: Bert Guntergunter.ber...@gene.com Cc:r-help@r-project.org r-help@r-project.org Subject: Re: [R] Should there be an R-beginners list? Message-ID:

Re: [R] Package dependencies in building R packages

2013-12-31 Thread Paul Gilbert
The responses to this seem to be assuming that you want users to have access to your tt() function, that is, you export it. Just in case the really simple case has been overlooked: if you are only using this function internally in your package there should be no problem. Your package's

Re: [R] Plotting multiple time series with variables having different units

2014-02-05 Thread Paul Gilbert
I'm not sure if I understand exactly what you mean, but if you want separate panels, one above the other, with a common time span but each with their own Y scale, then the function tfplot() in package tfplot does this. There are examples in the User Guide at

Re: [R] package submission

2014-11-29 Thread Paul Gilbert
I was similarly bitten a couple of days ago when I submitted an update of my deldir package. I'm*pretty* sure that I completed all the requisite steps in the steps in the web-based submission procedure, but I never received the promised confirmation email. Being a thicko, I overlooked this

Re: [R] matrix which results singular but at the same time positive definite

2015-12-15 Thread Paul Gilbert
be trying to invert. In a non-innovations form the state has a physical interpretation rather than being an expectation, so the state tracking error should not be degenerate in that case. I mention all this because your covariance matrix looks very close to zero. Paul Gilbert On 12/11/2015 06:00

Re: [R] Estimating MA parameters through arima or through package "dlm"

2016-01-24 Thread Paul Gilbert
the details of what you're doing but the "equivalence" between state space and arima ( as paul gilbert pointed out a few weeks ago ) is not a true equivalence. To state this a bit more precisely, there is a true equivalence between the input-output equivalence classes of (linear, time inv

Re: [R] Updating a Time Series After Forecast()

2016-01-22 Thread Paul Gilbert
Lorenzo Berend's suggestion may be the simplest if you have univariate ts style series. If you are writing code and you want it to work with multivariate series and other time representations then you might want to consider the splice() function in package tframe. library(tfplot) ts3 <-

Re: [R] FW: Multivariate ARIMA

2016-02-15 Thread Paul Gilbert
See also package dse. There are examples in the guide: http://cran.at.r-project.org/web/packages/dse/vignettes/Guide.pdf Paul On 02/14/2016 06:00 AM, r-help-requ...@r-project.org wrote: Date: Fri, 12 Feb 2016 18:12:37 + From: Thomas Lofaro

Re: [R] how to transform db query result into a set of timeseries

2016-09-07 Thread Paul Gilbert
-%d %H:%M:%S") ) There are several other details in the function that you may find useful. Paul Gilbert Date: Mon, 5 Sep 2016 22:28:50 +0200 From: Stef Mientki <stef.mien...@gmail.com> hello, I've a number of timeseries into a database and want to display these timeseries into graph.

[R] Optimization issue - Solution converges for any initial value

2016-09-30 Thread Paul Gilbert
Narendra You should check the definition of your objective function, something seems to be wrong. When you evaluate the objective function with your initial guess, and then with some different value, you should expect the returned value will be different, but it is not: >

Re: [R] Dealing with -Inf in a maximisation problem.

2016-11-07 Thread Paul Gilbert
I am trying to deal with a maximisation problem in which it is possible for the objective function to (quite legitimately) return the value -Inf, (Just to add to the pedantic part of the discuss by those of us that do not qualify as younger and wiser:) Setting log(0) to -Inf is often

Re: [R] Some basic time series questions

2016-11-17 Thread Paul Gilbert
On 11/17/2016 06:00 AM, r-help-requ...@r-project.org wrote: Hi, As I sit and learn how to work with time series, I've run into a problem that is eluding a quick easy answer (and googling for answers seems to really slow the process...) Question #1-- In a simple example on R 3.3.1 (sorry my

Re: [R] require vs library ( Some basic time series questions)

2016-11-17 Thread Paul Gilbert
On 11/17/2016 04:49 PM, Jeff Newmiller wrote: require(tfplot) tfplot(x.ts) Would just like to point out that require() should not be treated as interchangeable with library(). The former returns a logical status indicating success or failure, while the latter throws an error if it falls.

Re: [R] Optim function returning always initial value for parameter to be optimized

2018-02-10 Thread Paul Gilbert
On 02/10/2018 06:00 AM, r-help-requ...@r-project.org wrote: Did you check the gradient? I don't think so. It's zero, so of course you end up where you start. Try data.input= data.frame(state1 = (1:500), state2 = (201:700) ) err.th.scalar <- function(threshold, data){ state1 <-

Re: [R] Random Seed Location

2018-03-04 Thread Paul Gilbert
er cluster. (If anyone knows differently I would very much like to hear.) Paul Gilbert > Hi all, > > For some odd reason when running naïve bayes, k-NN, etc., I get slightly > different results (e.g., error rates, classification probabilities) from > run > to run even though I

Re: [R] Random Seed Location

2018-03-05 Thread Paul Gilbert
On 03/04/2018 07:14 PM, Henrik Bengtsson wrote: On Sun, Mar 4, 2018 at 3:23 PM, Duncan Murdoch wrote: ... An issue is that .Random.seed doesn't contain the full state of the RNG system, so restoring it doesn't necessarily lead to an identical sequence of output.

Re: [R] Limiting the scope of RNGkind/set.seed

2019-04-17 Thread Paul Gilbert
a record when you discover something you want to reproduce. 6/ If parallel computing is considered then for reproducibility you need to save the number of nodes in the cluster. (I think this point is not as widely known as it should be.) No doubt I have forgotten a few things. Paul Gilbert On 4