Re: [R] function

2008-06-01 Thread ctu
I wrote a function and I hope this helps b-c(1,2,3,4);lambda-c(0.3,0.4,0.5,0.6) m-c(0.10,0.11,0.12,0.13);t-c(7,8,9,10) N=4 Y-matrix(data=NA,nrow=4, ncol=1) for (i in 1:N){ y=b*(1-exp(lambda*(t^m))) Y-matrix(data=y, nrow=4, ncol=1) Y-as.numeric(Y) sim-data.frame(t,

Re: [R] optim error

2008-06-01 Thread Dieter Menne
keunhchoi at gmail.com writes: I saw a similar question but I still don't fully understand how to implement optim. vol-rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) time-rep(c(2,4,8),each=7) p.mated-c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, null, 0.68, 0.62, 0.64, 0.58, 0.53, 0.47, + 0.24,

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Gabor Grothendieck
On Sun, Jun 1, 2008 at 8:47 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: On Sun, Jun 1, 2008 at 8:35 AM, Megh Dal [EMAIL PROTECTED] wrote: Hi all, I have following monthly time series : head(data1) V1 V2 V3 1 Nov-80 NA 1007.44 2 Dec-80 NA 982.05 3 Jan-81 NA 994.25 4

[R] Creating zoo object on monthly time series

2008-06-01 Thread Megh Dal
Hi all, I have following monthly time series : head(data1) V1 V2 V3 1 Nov-80 NA 1007.44 2 Dec-80 NA 982.05 3 Jan-81 NA 994.25 4 Feb-81 NA 996.31 5 Mar-81 NA 939.91 6 Apr-81 NA 923.32 Now I want to convert it to a 'zoo' object. I wrote following syntax : ss = zoo(data1[,3],

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Gabor Grothendieck
On Sun, Jun 1, 2008 at 8:35 AM, Megh Dal [EMAIL PROTECTED] wrote: Hi all, I have following monthly time series : head(data1) V1 V2 V3 1 Nov-80 NA 1007.44 2 Dec-80 NA 982.05 3 Jan-81 NA 994.25 4 Feb-81 NA 996.31 5 Mar-81 NA 939.91 6 Apr-81 NA 923.32 If the suggestion

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Megh Dal
I got following: z - zoo(data1[,3], as.yearmon(data1[,1], %b-%y)) head(z) Jan 0001 Jan 0002 Jan 0003 Jan 0004 Jan 0005 Jan 0006 1206.68 782.45 1187.00 1398.77 1883.23 1431.80 z - zoo(data1[,3], as.Date(as.yearmon(data1[,1], %b-%y))) head(z) 0001-01-01 0002-01-01 0003-01-01

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Gabor Grothendieck
You need to unambiguously specify what your data looks like. Please provide the dput output as previously requested. Also what version of zoo are you using? packageDescription(zoo)$Version On Sun, Jun 1, 2008 at 9:37 AM, Megh Dal [EMAIL PROTECTED] wrote: I got following: z - zoo(data1[,3],

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Gabor Grothendieck
Also here is an example showing it works with the assumed format and zoo version: data1 - structure(list(V1 = structure(c(6L, 2L, 4L, 3L, 5L, 1L), .Label = c(Apr-81, + Dec-80, Feb-81, Jan-81, Mar-81, Nov-80), class = factor), + V2 = c(NA, NA, NA, NA, NA, NA), V3 = c(1007.44, 982.05,

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Megh Dal
packageDescription(zoo)$Version [1] 1.1-1 Gabor Grothendieck [EMAIL PROTECTED] wrote: You need to unambiguously specify what your data looks like. Please provide the dput output as previously requested. Also what version of zoo are you using? packageDescription(zoo)$Version On Sun, Jun 1,

[R] Chequea mi perfil en Facebook

2008-06-01 Thread Pau Marc Muñoz Torres
He creado un perfil en Facebook donde puedo publicar mis imágenes, vídeos y eventos, y quiero agregarte como amigo/a para que puedas verlo. Primero, necesitas registrarte en Facebook. Una vez registrado/a, puedes también crear tu propio perfil. Gracias, Pau Esta es la dirección:

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Gabor Grothendieck
Please upgrade to the latest version of zoo. as.yearmon.factor was only added to zoo in recent versions and its likely your date column is a factor. If that is not the problem then please provide the dput output as requested. On Sun, Jun 1, 2008 at 9:59 AM, Megh Dal [EMAIL PROTECTED] wrote:

Re: [R] Plotting a cubic line from a multiple regression

2008-06-01 Thread David Winsemius
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED] uk: I'm attempting to plot a cubic relationship between two variables controlling for the effects of a third variable. In this short example, I'm trying to use AGE to predict CORTEX while controlling for the effects of TIV (total

Re: [R] In fact this is a Stats question, but... The return.... Again!

2008-06-01 Thread David Winsemius
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Dear All, I suspect I'm becoming a bit anoying but... following the question about the low r2 vs signific regression (thru ANCOVA), the reviewer suggested (and I quote here): 'If you used RNA/DNA ratios as the dependent variable, but

Re: [R] Creating zoo object on monthly time series

2008-06-01 Thread Megh Dal
Thanks Gabor, I have updated that and it is now working fine Gabor Grothendieck [EMAIL PROTECTED] wrote: Please upgrade to the latest version of zoo. as.yearmon.factor was only added to zoo in recent versions and its likely your date column is a factor. If that is not the problem then please

[R] How to plot a matrix

2008-06-01 Thread ss
Hi list, If I have a matrix, a-read.table(a.txt,header=TRUE,row.names=1) dim(a) [1] 4 3 a x y z a1 1 6 3 a2 2 6 3 a3 2 3 8 a4 5 3 4 Can you suggest how to produce a plot like the one attached here? Basically, I want to plot each sample (each column) using the dots one by one and also

[R] Eliminating [...] from print

2008-06-01 Thread Ted Harding
Hi Folks, This must be easy but I've not managed to locate the solution! Basically: I'm using sink() to save successively obtained results, e.g. I construct a set of regression coefficients etc. with names rows and columne (I want to see the names in the output) as an object (say Object), and

Re: [R] Eliminating [...] from print

2008-06-01 Thread Matthias Kohl
Dear Ted, what about cat(\n) or message() Best, Matthias (Ted Harding) wrote: Hi Folks, This must be easy but I've not managed to locate the solution! Basically: I'm using sink() to save successively obtained results, e.g. I construct a set of

Re: [R] Eliminating [...] from print

2008-06-01 Thread Ted Harding
Many thanks, Matthias! cat() did the job, exactly as wanted. message() won't do, since sink() eother captures output (type=output, the default) or captures messages (type=message), in which case it won't capture the ouput! In any case, even if it captured both, I wouldn't want to sin() all the

[R] transforming output of grid.locator() to coordinates of a leaf viewport

2008-06-01 Thread Wittner, Ben, Ph.D.
Short form: How do I transform the output of grid.locator() (or grid.locator(unit='npc')) to the native (or npc) coordinates of a viewport other than the top-level viewport? Thanks in advance. -Ben Long form: I would like the user to be able to

Re: [R] transforming output of grid.locator() to coordinates of a leaf viewport

2008-06-01 Thread hadley wickham
Ben, What if the click occurs over multiple viewports? Hadley On Mon, Jun 2, 2008 at 6:50 AM, Wittner, Ben, Ph.D. [EMAIL PROTECTED] wrote: Short form: How do I transform the output of grid.locator() (or grid.locator(unit='npc')) to the native (or npc) coordinates of a

Re: [R] How to plot a matrix

2008-06-01 Thread David Winsemius
ss [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Hi list, If I have a matrix, a-read.table(a.txt,header=TRUE,row.names=1) dim(a) [1] 4 3 a x y z a1 1 6 3 a2 2 6 3 a3 2 3 8 a4 5 3 4 Can you suggest how to produce a plot like the one attached here? Basically, I want to

Re: [R] Unicode characters (R 2.7.0 on Windows XP SP3 and Hardy Heron)

2008-06-01 Thread Hans-Jörg Bibiko
On 31.05.2008, at 00:11, Prof Brian Ripley wrote: On Fri, 30 May 2008, Duncan Murdoch wrote: But I think with Brian Ripley's work over the last while, R for Windows actually handles utf-8 pretty well. (It might not guess at that encoding, but if you tell it that's what you're using...)

Re: [R] transforming output of grid.locator() to coordinates of a leaf viewport

2008-06-01 Thread Wittner, Ben, Ph.D.
Hadley, In my application the leaf viewports will not overlap, but I guess that would not necessarily be the case for all applications. In any event, do you happen to know how to transform coordinates in the top-level viewport to coordinates in another viewport in the tree? Thanks. -Ben

Re: [R] tolstoi.newcastle dead?

2008-06-01 Thread Patrick Connolly
On Sat, 31-May-2008 at 06:07PM -0400, Carl Witthoft wrote: Anyone know what's up w/ tolstoi.newcast.edu.au (home of the threaded R-help archives)? I've got a can't connect for several days now. No luck here either, even with the correct spelling. $ ping tolstoy.newcastle.edu.au PING

[R] optim error - repost

2008-06-01 Thread keunhchoi
Here is a clean version. I did this with nls and it works (see below), but I need to do it with optim. Keun-Hyung # optim vol-rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) time-rep(c(2,4,8),each=7) p.mated-c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, NA, 0.68, 0.62, 0.64, 0.58, 0.53, 0.47, 0.24, 0.8, 0.79,

Re: [R] optim error - repost

2008-06-01 Thread Katharine Mullen
try: vol - rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) time - rep(c(2,4,8),each=7) p.mated - c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, NA, 0.68, 0.62, 0.64, 0.58, 0.53, 0.47, 0.24, 0.8, 0.79, 0.71, 0.56, 0.74, 0.8, 0.47) eury - data.frame(vol=vol, time=time, p.mated=p.mated) eury - na.omit(eury) p0 -

[R] how to analyze time series structures?

2008-06-01 Thread ensark
hı, I am preparing undergraduate thesis If you help me this would make me feel good. First I need to analyze effect of Dow Jones Industrial average(DJIA)'s return on Istanbul Stock Exchange(ISE). I want to use Markov-Switching Bayesian Vector Autoregression Models (MSBVAR) that is used to

Re: [R] how to analyze time series structures?

2008-06-01 Thread Richardson, Patrick
would you like coffee with that? From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of ensark [EMAIL PROTECTED] Sent: Sunday, June 01, 2008 5:30 PM To: r-help@r-project.org Subject: [R] how to analyze time series structures? hı, I am preparing

Re: [R] how to analyze time series structures?

2008-06-01 Thread Jorge Ivan Velez
Anything else? Jorge On Sun, Jun 1, 2008 at 5:30 PM, ensark [EMAIL PROTECTED] wrote: hý, I am preparing undergraduate thesis If you help me this would make me feel good. First I need to analyze effect of Dow Jones Industrial average(DJIA)'s return on Istanbul Stock Exchange(ISE). I

[R] Missing spline_coef DLL and Rob Hyndmans monotonic interpolator

2008-06-01 Thread Paul.Rustomji
Hello R help I have been trying to use Rob Hyndman's monotonically increasing spline function. But like another user or two seem have a problem with a missing DLL (namely spline_coef). None of the previous help postings seemed to have any solutions to this problem. As per a Ripley suggestion I

[R] Fitting jump diffusion models

2008-06-01 Thread Ross Bowden
Hello everyone. I have an interest in fitting jump diffusion AR(p) processes (which will likely form part of a Garch model). Does anyone know of some R code that will allow this please, hopefully using max likelihood (or similar) methods? I'm currently using WinBUGS and RWinBUGS to utilise a