[R] difftime problems with daylight saving time?

2010-09-15 Thread ravi
these difficulties have anything to do with one time object being CET and the other CEST? If yes, is there any workaround? Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] apparent problems with the textConnection command

2010-05-19 Thread ravi
. They are just my attempts to understand the R language better. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] apparent problems with the textConnection command

2010-05-19 Thread ravi
expected them to have the same capability. So, my question is - can these commands be tweaked in some way to have the same flexibility? Thanking you, Ravi - Original Message From: Mario Valle mva...@cscs.ch To: ravi rv...@yahoo.se Cc: r-help@r-project.org r-help@r-project.org Sent: Wed, 19

[R] ggplot : scale_x_datetime issues

2009-12-14 Thread ravi
steps pending).. I will appreciate any and all the help that I can get. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] Customization options with .Renviron, R_LIBS, .Rprofile etc

2009-07-21 Thread ravi
, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] help in using gsub and ?

2009-07-31 Thread ravi
,Origin)) I would appreciate any help that I can get. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

[R] regex question

2009-08-04 Thread ravi
the letters.   There may be many ways to do it, but I have not succeeded in coming up with even one way! I will appreciate any tips that I can get. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Comination of two barcharts and one xyplot

2008-08-13 Thread ravi
help that I can get. Thanking You, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] Comination of two barcharts and one xyplot

2008-08-13 Thread ravi
plot)? Is it possible? 2. Is it easier to do this with ggplot? 3. I would like to know how I can present the legend also. Will appreciate any help that I can get. Thanking You, Ravi - Original Message From: stephen sefick [EMAIL PROTECTED] To: ravi [EMAIL PROTECTED] Cc: r-help@r

Re: [R] Comination of two barcharts and one xyplot

2008-08-18 Thread ravi
be : cat1, cat2, cat3. The first two are for the two categories in the barchart and the third for the line plot. Thanks, Ravi - Original Message From: Duncan Mackay [EMAIL PROTECTED] To: ravi [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Thursday, 14 August, 2008 1:20:55 AM Subject: Re

[R] Summing up columns with NA elements in a data frame

2008-09-23 Thread ravi
(a) print(a) #  Now, the row numbers (why?) seem to get added - sometimes. There are some things that I am missing here. Will appreciate all help in understanding the issues here. Thanking You, Ravi __ R-help@r-project.org

[R] fuzzy merge

2008-04-09 Thread ravi
matching? Would it be easier to convert the times into data classes? Or, it better to treat them as strings and use regular expresssions for doing the matching? I would appreciate any help that I can get. Thanking You, Ravi __ R-help@r-project.org

[R] help with the unique function

2008-05-07 Thread ravi
all the help that I can get. Thank You, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

[R] help with updating to R2.7

2008-05-07 Thread ravi
will appreciate all the help that I can get. Thanks, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] help with the unique function

2008-05-08 Thread ravi
Hi, Thanks for the different suggestions - Jorge, Erik, Marc, Ted and Phil. Thanks to you, I have learnt quite a few, for me new, tricks and methods. Thanks, Ravi - Original Message From: Phil Spector [EMAIL PROTECTED] To: ravi [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Wednesday

Re: [R] help with updating to R2.7

2008-05-08 Thread ravi
not work either. I know that it would be best if I reproduced the exact error messages, but I have tried so many different things now and have lost track of the exact error messages at each stage. Looking for help, Thanking you, Ravi - Original Message From: Gabor Grothendieck [EMAIL

Re: [R] help with updating to R2.7

2008-05-08 Thread ravi
http_proxy=http://user:[EMAIL PROTECTED]:80/ Error: unexpected symbol in path_to_R\bin\Rgui.exe http_proxy Should I run the above commands in R, or in the windows command window? Thanking You, Ravi - Original Message From: Duncan Murdoch [EMAIL PROTECTED] To: ravi [EMAIL PROTECTED] Cc: r-help@r

Re: [R] help with updating to R2.7

2008-05-08 Thread ravi
command window. Can you please show me a small example of how I can get started with it. Thanking You, Ravi - Original Message From: Gabor Grothendieck [EMAIL PROTECTED] To: ravi [EMAIL PROTECTED] Cc: Duncan Murdoch [EMAIL PROTECTED]; r-help@r-project.org Sent: Thursday, 8 May, 2008 4:51

Re: [R] help with updating to R2.7

2008-05-09 Thread ravi
for reminding me of proper etiquette when submitting a question. Gabor, I am not realy sure right now about how I should get started with batchfiles. But I will try it out and see how far I can get with them. Thanks, Ravi - Original Message From: Vincent Goulet [EMAIL PROTECTED] To: John C

[R] help with Rtools and Rgraphviz

2009-04-28 Thread ravi
appreciate all help in either directing me to the relevant documentation, or in knowing exactly the list of commands that will do the install. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] regrouping factor levels

2009-05-22 Thread ravi
You, Ravi  __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] replacing Na's in a vector with the preceding integer element

2008-11-13 Thread ravi
(1,1,1,5,5,3,4,4,4,4,4,9,9,0,0,0) How can I do this with R? Will appreciate all the help that I can get. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] extracting data from a list of unformatted text files

2008-11-20 Thread ravi
with examples showing how similiar problems are tackled. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

Re: [R] extracting data from a list of unformatted text files

2008-11-20 Thread ravi
Jim, Thank you so much. There is a lot for me here to dig into, learn and understand. But you have made my task so much easier by giving me sufficient material to get started. Once again, thanks a lot. /Ravi - Original Message From: jim holtman [EMAIL PROTECTED] To: ravi [EMAIL

[R] Reading attachment mails on the R-help mailing list

2009-02-12 Thread ravi
it, for example with notepad, to read it. Is there any simple workaround for this? That is, how can I retain the Perl installation and still read the mail. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] Reading attachment mails on the R-help mailing list

2009-02-12 Thread ravi
and access the text content in it from the web browser. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] Help with lattice graphics

2008-12-01 Thread ravi
with the lattice package? ## I would like to have the legend on the top in one row ## Thanking You, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] regex problems with the escape character

2009-08-17 Thread ravi
different ways of solving this problem. Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

[R] help in matching two column vectors

2009-09-11 Thread ravi
the extra elements in the 2nd vector. I will appreciate any help that I can get. Thanks, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] decomposing an irregularly spaced time series

2010-02-26 Thread ravi
there. Is there an alternative method of approaching this task? Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] help with zoo

2010-03-01 Thread ravi
forward to the decomposition of the time series? Thanking you, Ravi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

Re: [R] help with zoo

2010-03-01 Thread ravi
the final week of a year to the weeks of the following year, and so on. I am hoping for a more elegant solution, preferably where the index can can be converted back to dates for plotting. Thanking you, Ravi   - Original Message From: Gabor Grothendieck ggrothendi...@gmail.com To: ravi rv

[R] installing java on ubuntu 11.10 installation

2011-11-09 Thread ravi
to have worked. I get the following output : ravi@raviM1330:~$ java -version The program 'java' can be found in the following packages:  * gcj-4.4-jre-headless  * gcj-4.6-jre-headless  * openjdk-6-jre-headless  * gcj-4.5-jre-headless  * openjdk-7-jre-headless Try: sudo apt-get install selected package

[R] dealing with sweave.sty and pgfSweave

2011-05-21 Thread ravi
-2.13.0/share/texmf/tex/latex/Sweave' contains spaces, this may cause problems when running LaTeX   Short of reinstalling R in a separate folder, is there something that I can do to fix this problem?   I have R2.13 on a win XP pc. Thanking you, Ravi __ R

[R] texture mapping images on the faces of a cuboid with rgl

2013-01-30 Thread ravi
page referred to above). But, as can be seen from my questions, I don't understand this sufficiently to do this. But I hope that I have given sufficient information to explain my problem. Thanks, Ravi [[alternative HTML version deleted]] __ R

[R] help with a special variant of balloonplot

2012-08-24 Thread ravi
am not sure if a simple tweak can lead to a solution. I will appreciate any help that I can get. Thanks, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] sourcecode for the balloonplot function from the gplots package

2012-08-25 Thread ravi
'balloonplot.default' not found How do I access the non-visible functions? Thanks, Ravi   __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] help with a special variant of balloonplot

2012-08-26 Thread ravi
this new parameter can be accomodated into the code. I must confess that I am far from a pro at this sort of stuff. I will appreciate it if I can get some help. However, I will also give it a try myself. Will come back later if I run into problems. Thanks, Ravi - Original Message - From

[R] porting an access database to sqlite

2014-11-25 Thread ravi
this in a simple way. I would appreciate all help that I can get.Thanks,Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] porting an access database to sqlite

2014-11-27 Thread ravi
am near the tail end? There seems to be no simple method for finding the size of the table. Thanks,Ravi ravi rv...@yahoo.se 11/25/14 12:42 PM Hi,All my data is presently locked in a Microsoft access database. This has huge data in a number of large tables. Using RODBC and connecting to it takes

Re: [R] plotting over a raster image with control over location and orientation

2015-08-22 Thread ravi
not seem to be in agreement. How do I convert, for example, the point (10,-12) to npc units? I hope that I have explained my problem sufficiently well. If I can get help with an approach involving viewports also, I would be grateful for any help that I can get. Thanks, Ravi From: ravi rv

[R] plotting over a raster image with control over location and orientation

2015-08-21 Thread ravi
to have the image more transparent just under the x and y labels and axis labelsThanks, Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] plotting over a raster image with control over location and orientation

2015-08-22 Thread ravi
='b',col='red',newpage=FALSE) plot(xs,ys,type='b',col='red') #fills the whole screen instead of just the intended viewport Thanks,Ravi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

Re: [R] nls optimize

2010-10-19 Thread Ravi Varadhan
(n.dsm,2),km,sep= )) # text should be placed at different location However, note that you do not need `optimize'. The answer that you are seeking is `n.dsm', which is obtained directly from the nls fit. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

Re: [R] using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval

2010-10-19 Thread Ravi Varadhan
this helps, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David LeBauer Sent: Friday, October 15, 2010 5:31 PM To: r-help Subject: [R] using optimize with two unknowns, e.g. to parameterize a distribution with given confidence

Re: [R] question on optim() fn.

2010-10-20 Thread Ravi Varadhan
still check the first and second order KKT optimality conditions. You can also use `optimx' package, which provides a test of KKT conditions, and also allows the use of other optimizers in R. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org

Re: [R] question on optim() fn.

2010-10-21 Thread Ravi Varadhan
use optimx() to do this, although the results of the tests of first and second order conditions are sensitive to scaling of parameters and objective function. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division

Re: [R] how do I make a correlation matrix positive definite?

2010-10-22 Thread Ravi Varadhan
Nick Higham (2002) discusses algorithms for this. One of the algorithms discussed in the paper is implemented in the Matrix package as `nearPD' function. library(Matrix) ?nearPD Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

Re: [R] Error message in using nlm() and optim()

2010-10-22 Thread Ravi Varadhan
You have not provided us sufficient information to help you. I would guess that the error message probably has something to do with the way your likelihood function is defined. Can you at least show us how the function is defined (just the argument list) and the optim call? Ravi. -Original

Re: [R] Help: Maximum likelihood estimation

2010-10-22 Thread Ravi Varadhan
to use direct maximization, you could try to impose all the constraints on the parameters, including positive definiteness of covariance matrix, and solve the constrained optimization problem. R has two packages: alabama and Rsolnp that can handle nonlinear constraints. Ravi. -Original

Re: [R] how do I make a correlation matrix positive definite?

2010-10-22 Thread Ravi Varadhan
I responded to another question that asked the exact same question. So, I will repeat my answer here: Nick Higham (2002) discusses algorithms for this. One of the algorithms discussed in the paper is implemented in the Matrix package as `nearPD' function. library(Matrix) ?nearPD Ravi

Re: [R] Help: Maximum likelihood estimation

2010-10-24 Thread Ravi Varadhan
Can you provide a reproducible code? Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu

Re: [R] Optimize parameters of ODE Problem which is solved numeric

2010-10-25 Thread Ravi Varadhan
the equations. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael S. Sent: Saturday, October 23, 2010 8:06 PM To: r-help@r-project.org Subject: [R] Optimize parameters of ODE Problem which is solved numeric Hi, I have a data

Re: [R] Setting constraints in the glm package

2010-10-26 Thread Ravi Varadhan
likelihood in terms of a. We then maximize this over `a' . We can use, for example, `optimize' to accomplish this. This is not contrived. I have encountered this situation in a project. Ravi. Ravi Varadhan, Ph.D. Assistant

Re: [R] Constrained Regression

2010-10-31 Thread Ravi Varadhan
be a bit tricky. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message

Re: [R] saddle points in optim

2010-11-07 Thread Ravi Varadhan
Try optimx package (with the option all.methods=TRUE). This helps you in 2 different ways: (1) you can compare estimates from multiple optimizers, and (2) you can look at the first- and second-order KKT conditions for optimality. Hope this helps, Ravi

Re: [R] saddle points in optim

2010-11-07 Thread Ravi Varadhan
The hessian from `optim' is not as accurate as that from `numDeriv' (with the default of Richardson extrapolation), so I would trust the numDeriv's hessian result over that of optim. However, without seeing what you actually did, this is only a surmise. Ravi

[R] Help with slope comparisons

2010-11-11 Thread Ravi Kulkarni
line with just three data points - is this really what is meant by a slope analysis? Any help most appreciated... Ravi -- View this message in context: http://r.789695.n4.nabble.com/Help-with-slope-comparisons-tp3037455p3037455.html Sent from the R help mailing list archive at Nabble.com

Re: [R] question about constraint minimization

2010-11-22 Thread Ravi Varadhan
I do not understand the constraint x1 = x3 = x4. If this is correct, you only have 10 unknown parameters. If you can correctly formulate your problem, you can have a look at the packages alabama or BB. The function `auglag' in alabama or the function `spg' in BB may be useful. Ravi

Re: [R] how to calculate derivative

2010-11-22 Thread Ravi Varadhan
Here is a simple approach: data - read.table(test-data.txt) deriv - diff(data$V2) / diff(data$V1) times - (data$V1[-1] + data$V1[-3545])/2 plot(times, deriv, type=l) Another approach is to smooth the original data and then obtain derivatives from the smooth Ravi

Re: [R] question about constraint minimization

2010-11-23 Thread Ravi Varadhan
, Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu -Original Message- From: r-help-boun...@r

Re: [R] non-linear fourth-order differential equations

2010-11-29 Thread Ravi Varadhan
OP is asking about a system of fourth-order differential equations, whereas you are telling her how to solve a single, algebraic nonlinear equation. Take a look at package deSolve, and the function `lsode' in that package for solving a system of nonlinear ODEs (given initial values). Ravi

Re: [R] Outlier statistics question

2010-11-30 Thread Ravi Varadhan
It is, perhaps, more apt to call the tests of outliers as tests of outright liars. Lies, damned lies, and tests of outliers Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology

Re: [R] [R-pkgs] New package list for analyzing list surveyexperiments

2010-07-15 Thread Ravi Varadhan
Let me quote the authority on naming convention: What's in a name? That which we call a rose by any other name would smell as sweet. Best, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine

[R] Two Dimensional Transformation

2010-07-16 Thread Ravi Ramaswamy
Hi - I am trying to map a two dimensional area A to another two dimensional area B using a function. For instance A = {(x,y), 0x1, 0y1}, and the function is u = x+y and v = x/y. 2-D area is defined by (u,v). Is there a way I can do this in R? Thanks Ravi [[alternative HTML version

Re: [R] Constrain density to 0 at 0?

2010-07-21 Thread Ravi Varadhan
assumes that the density has 0 gradient at the boundary (gradient defined from the right hand side). There are other (better) approaches as well. Look at a book on density estimation. Ravi. Ravi Varadhan, Ph.D. Assistant

[R] UseR! 2010 - my impressions

2010-07-23 Thread Ravi Varadhan
not have been as great as it was without the tireless efforts of Kate Mullen. The great thing about Kate is that she did so much without ever hogging the limelight. Thank you, Kate and thank you NIST! I cannot wait for UseR!2011! Best, Ravi

Re: [R] Optimization problem with nonlinear constraint

2010-07-26 Thread Ravi Varadhan
into any problems using it. Best, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Uli Kleinwechter Sent: Monday, July 26, 2010 10:16 AM To: r-help@r-project.org Subject: [R] Optimization problem with nonlinear constraint

Re: [R] T and F (was: Optimization problem with nonlinear constraint)

2010-07-28 Thread Ravi Varadhan
Hi Patrick, Actually, I feel just the opposite, i.e. it is not a good idea to use `T' for `TRUE'. I have been snared by this trap many a times in my early days with S-Plus and R. It is a good practice to use unabbreviated values. Best, Ravi. -Original Message- From: r-help-boun...@r

Re: [R] Optimization problem with nonlinear constraint

2010-07-28 Thread Ravi Varadhan
Very nice, Hans! I didn't know of the existence of Lambert W function (a.k.a Omega function) before. I didn't know that it occurs in the solution of exponential decay with delay: dy/dy = a * y(t - 1). Apparently it is more than 250 years old! Thanks, Ravi. -Original Message- From: r

Re: [R] Optimization problem with nonlinear constraint

2010-07-28 Thread Ravi Varadhan
For those interested in esoteric of special functions, here is a nice reference on the Lambert W function: http://www.cs.uwaterloo.ca/research/tr/1993/03/W.pdf Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Hans W Borchers

Re: [R] newton.method

2010-07-29 Thread Ravi Varadhan
Yes, there are two roots. Try this to get the 2 roots: require(BB) p0.mat - matrix(rnorm(10), 10, 1) # 10 random starting values ans - multiStart(par=p0, fn=f) ans$par You can see that the 2 roots are -2.438285 and 7.419378. Hope this helps, Ravi

Re: [R] how to get higher derivatives with deriv

2010-07-30 Thread Ravi Varadhan
) } } ddf } f - function (x,alpha) x^alpha x - seq(0, 3, length=100) plot(x, f(x, alpha=1.5), type=l, ylab=) lines(x, Deriv(f, 1)(x, alpha=1.5), col=2) lines(x, Deriv(f, 2)(x, alpha=1.5), col=3) Thanks for the elegant solution, Peter. Best, Ravi. -Original Message- From: r-help

Re: [R] Computation of largest eigenvalue

2010-07-30 Thread Ravi Varadhan
and corresponding eigenvector. How very large is your matrix? Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Christian Weiß Sent: Friday, July 30, 2010 9:32 AM To: r-help@r-project.org Subject: [R] Computation of largest

Re: [R] newton.method

2010-08-02 Thread Ravi Varadhan
what I am talking about. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of sammyny Sent: Monday, August 02, 2010 4:49 AM To: r-help@r-project.org Subject: Re: [R] newton.method I have this function: function(x) -0.3*x*exp

Re: [R] Need help on upper.tri()

2010-08-03 Thread Ravi Varadhan
(1) is not. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message

Re: [R] Stopping precision using 'optim'

2010-08-06 Thread Ravi Varadhan
) if you want better (or different) answers. You should not *minimize* the log-likelihood. You may have meant that you are minimizing its negative. You can do this by setting control$fnscale = -1. Hope this helps, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] optimization subject to constraints

2010-08-09 Thread Ravi Varadhan
You may want to look at: http://cran.r-project.org/web/packages/alabama/index.html Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gildas Mazo Sent: Monday, August 09, 2010 12:49 PM To: r-help@r-project.org Subject: [R

Re: [R] optimization subject to constraints

2010-08-09 Thread Ravi Varadhan
constrOptim can only handle linear inequality constraints. It cannot handle equality (linear or nonlinear) as well as nonlinear inequality constraints. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dwayne Blind Sent

Re: [R] [Fwd: Re: optimization subject to constraints]

2010-08-10 Thread Ravi Varadhan
] -1.414213 $iterations [1] 10 $lambda [1] -0.7068717 $penalty [1] -6.496021e-08 $counts function gradient 100 30 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School

Re: [R] Need help to understand integrate function

2010-08-11 Thread Ravi Varadhan
Try this: options(digits=10) integrate(f=powerLaw2, lower=0, upper=Inf, l1=1.8980185, l2=-0.0804259, c0=1, t0=259.78, rel.tol=1.e-10) 0.01089019946 with absolute error 3.7e-11 Ravi. Ravi Varadhan, Ph.D. Assistant

Re: [R] Need help to understand integrate function

2010-08-12 Thread Ravi Varadhan
The magic is not in setting options(digits=10). I did that just to show you the accuracy of the answer. The magic is in setting a more stringent error tolerance, rel.tol=1.e-10. The divergent error is due to the fact that the default tolerance of (roughly) 1.e-04 is too large. Ravi

Re: [R] Constrained non-linear optimisation

2010-08-24 Thread Ravi Varadhan
David, I am not sure I completely understand your problem. However, you can take a look at a couple of packages in R that can handle (smooth) nonlinear optimization with general (smooth) constraints: library(alabama) ?constrOptim.nl and library(Rsolnp) ?solnp Best, Ravi

Re: [R] What does this warning message (from optim function) mean?

2010-08-25 Thread Ravi Varadhan
Hi, You did not give us any information about your likelihood function, f, nor did you provide a reproducible example. So, I cannot tell for sure whether the parameter estimates are reliable. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
] 0.1429934 $npv [1] 1.705303e-12 Hope this helps, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Adrian Ng Sent: Wednesday, August 25, 2010 8:39 AM To: r-help@r-project.org Subject: [R] Secant Method Convergence (Method

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
there are no real zeros or there are multiple zeros of the NPV function. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Adrian Ng Sent: Wednesday, August 25, 2010 8:39 AM To: r-help@r-project.org Subject: [R] Secant Method Convergence

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
. Having said that, I am not sure about the convergence problem that you are having without seeing the actual example. Ravi. -Original Message- From: Adrian Ng [mailto:a...@hamiltonlane.com] Sent: Wednesday, August 25, 2010 5:28 PM To: Ravi Varadhan; r-help@r-project.org Subject: RE: [R

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
] 0.4106115 $npv [1] 2.984279e-13 Ravi. -Original Message- From: Adrian Ng [mailto:a...@hamiltonlane.com] Sent: Wednesday, August 25, 2010 6:23 PM To: Ravi Varadhan Subject: RE: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR) The forum is kind of slow so I'm just re

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
) ANXIRR(CF, dates, guess=0.1) ANXIRR(CF, dates, guess=0.1) $irr [1] 0.3740656 $npv [1] 2.102695e-09 Hope this helps, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
: 0.3721850 fval: 3.483669 par: 0.3740179 fval: 0.08815743 par: 0.3740655 fval: 0.0002613245 par: 0.3740656 fval: 1.966778e-08 $par [1] 0.3740656 $value [1] 1.966778e-08 $iter [1] 8 Hope this helps, Ravi. Ravi Varadhan

Re: [R] R-help

2010-08-27 Thread Ravi Varadhan
assignment problem, but I do not know which algorithm is used. This is not documented in the help page. Best, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of venkatesh bandaru Sent: Friday, August 27, 2010 1:08 AM To: r-help

Re: [R] R-help

2010-08-27 Thread Ravi Varadhan
I ran some comparisons of `lp.assign' and `solve_LSAP' on a couple of moderately large problems. The `solve_LSAP' appears to be substantially faster than `lp.assign'. Best, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

[R] Speeding up prediction of survival estimates when using `survifit'

2010-08-30 Thread Ravi Varadhan
faster alternatives. Thanks. Best, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu

Re: [R] question on optim

2010-09-07 Thread Ravi Varadhan
that the obj fn is correctly specified before we can start tackling other issues. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502

Re: [R] question on optim

2010-09-08 Thread Ravi Varadhan
, which is essentially identical to optim call. This feature can be especially useful for developers to benchmark different algorithms and choose the best one for their class of problems. http://cran.r-project.org/web/packages/optimx/index.html Ravi. -Original Message- From: r-help-boun

Re: [R] optimized value worse than starting Value

2010-09-08 Thread Ravi Varadhan
this helps, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Bernsteiner Sent: Wednesday, September 08, 2010 8:36 AM To: r-help@r-project.org Subject: [R] optimized value worse than starting Value Dear all, I'm optimizing

Re: [R] optimized value worse than starting Value

2010-09-08 Thread Ravi Varadhan
Numerical optimisations are best done using as many methods as possible See the optimx package: http://cran.r-project.org/web/packages/optimx/index.html Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Barry Rowlingson Sent

Re: [R] question on optim

2010-09-08 Thread Ravi Varadhan
The windows build is not on CRAN at the moment. It might be there in a few days. In the meanwhile you can get the windows binary from the optimizer project on r-forge: https://r-forge.r-project.org/R/?group_id=395 Ravi. -Original Message- From: Paulo Barata [mailto:pbar

Re: [R] optimized value worse than starting Value

2010-09-09 Thread Ravi Varadhan
Yes, Barry, we are aware of this issue. It is caused by printing to console from FORTRAN in one of the optimization codes, ucminf. If we set trace=FALSE in optimx, this problem goes away. Ravi. Ravi Varadhan, Ph.D

Re: [R] nonlinear programming package

2010-09-11 Thread Ravi Varadhan
, the `constrOptim' function in the base distribution can handle only linear inequality constraints. All of these packages are available on CRAN. Hope this helps, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division

  1   2   3   4   5   6   7   8   9   >