ChatGPT provided an R code with error when I asked a question related to
prediction of a new data point for linear mixed effects model. So, it is not
immune to coding mistakes!
Ravi
From: R-devel on behalf of Boris Steipe
Sent: Monday, February 13, 2023
Thank you. This is a very useful idea!
Best,
Ravi
From: R-devel on behalf of Viechtbauer,
Wolfgang (SP)
Sent: Thursday, April 30, 2020 6:59:02 AM
To: r-devel
Subject: Re: [Rd] Use of MathJax (or something similar) in .Rd files
Thanks Gabor and Duncan! It
I, too, had encountered problems with Java on Windows 10 while I was trying to
install the package "xlsx." I tried the fixes I found online, but to no avail.
Thanks & Best regards,
Ravi
From: R-devel on behalf of Gregory Warnes
Sent: Saturday, March 28,
This is also strange:
qbeta <- function (p, shape1, shape2, ncp = 0, lower.tail = TRUE, log.p = FALSE)
{
if (missing(ncp))
.Call(C_qbeta, p, shape1, shape2, lower.tail, log.p)
else .Call(C_qnbeta, p, shape1, shape2, ncp, lower.tail,
log.p)
}
Since the default value is
It behaves as per documentation.
" Using diag(x) can have unexpected effects if x is a vector that could be of
length one. Use diag(x, nrow = length(x)) for consistent behavior."
Ravi
From: R-devel on behalf of Gábor Csárdi
Sent: Monday, September 17,
Hi Spencer,
Thank you for this wonderful service to the R community.
A suggestion: it would be great to discuss how to search github and
Bioconductor repositories.
Thanks,
Ravi
From: R-devel on behalf of Spencer Graves
: Friday, July 21, 2017 3:09 PM
To: Ravi Varadhan <ravi.varad...@jhu.edu>
Cc: Therneau, Terry M., Ph.D. <thern...@mayo.edu>; r-devel@r-project.org;
jorism...@gmail.com; westra.harm...@outlook.com
Subject: Re: [Rd] Wrongly converging glm()
Hi Ravi: Well said. In John's Rvmmin package,
Please allow me to add my 3 cents. Stopping an iterative optimization
algorithm at an "appropriate" juncture is very tricky. All one can say is that
the algorithm terminated because it triggered a particular stopping criterion.
A good software will tell you why it stopped - i.e. the stopping
Spencer,
Another option is to try the "lbfgs" package. Hans Werner Borchers has told me
that this is a good implementation of L-BFGS.
Best,
Ravi
From: R-devel on behalf of Spencer Graves
Sent:
Have you tried "optimx" package that John Nash and I wrote? The main purpose
is to be able to readily compare multiple optimizers on a particular class of
problems and see which one seems to do the best. It doesn't include nloptr,
but most other optimizers are there.
Ravi
Indeed!
Ravi
From: R-devel on behalf of Spencer Graves
Sent: Monday, August 22, 2016 8:59 AM
To: r-devel@r-project.org
Subject: Re: [Rd] Milestone: 9000 packages on CRAN
The entirety
all.equal.eigen() should also accommodate complex vectors, right?
Ravi
From: R-devel on behalf of Martin Maechler
Sent: Monday, April 11, 2016 3:08 AM
To: William Dunlap
Cc: r-devel; Jeroen Ooms
You are correct that indefinite means an antiderivative. A definite integral
has both limits specified. Technically correct terms are: proper and improper
definite integrals (although improper integrals are not synonymous with, but
include integrals with an infinite range). Your suggestion
, if there is any
interest.
Thanks Best,
Ravi
From: Duncan Murdoch murdoch.dun...@gmail.com
Sent: Friday, March 6, 2015 3:31 PM
To: Ravi Varadhan; r-devel@r-project.org
Subject: Re: [Rd] Hyper-dual numbers in R
On 06/03/2015 11:18 AM, Ravi Varadhan wrote:
Hi,
Has
Hi,
Has anyone in R core thought about providing hyper-dual numbers in R?
Hyper-dual (HD) numbers, invented by Jeffrey Fike at Stanford, are useful for
computing exact second-order derivatives (e.g., Hessian). HD numbers are
extensions of complex numbers. They are like quaternions and have 4
Hi,
I second Bert's comment. I would like to go even farther and suggest that it
would be really useful if one of the R gurus (like Simon) wrote a relatively
non-technical article in the R journal on this topic of
Depends/Imports/Suggested. Someone like myself would benefit immensely.
Thank
Thank you, Ben.
Best,
Ravi
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
Behalf Of Ben Bolker
Sent: Monday, June 02, 2014 8:07 PM
To: r-de...@stat.math.ethz.ch
Subject: Re: [Rd] A bug in princomp(), perhaps?
Ben Bolker bbolker at
Perhaps, adding Gavin's work around for a dataframe with missing values might
also be useful to the documentation:
princomp(na.omit(x))
Thanks,
Ravi
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
Behalf Of Ben Bolker
Sent: Monday, June
:15 AM
To: Ravi Varadhan
Cc: r-devel@r-project.org
Subject: Re: [Rd] A bug in princomp(), perhaps?
It's only documented to work for princomp.formula; other methods do not know
about na.action.
-pd
On 29 May 2014, at 22:10 , Ravi Varadhan ravi.varad...@jhu.edu wrote:
Hi,
It may be my
different than
when a formula is provided, with regards to the NA action? It should be easy
enough to remove the rows of `xâ with NAs. This is my main point.
Ravi
From: Gavin Simpson [mailto:ucfa...@gmail.com]
Sent: Friday, May 30, 2014 10:46 AM
To: Ravi Varadhan
Cc: peter dalgaard; r-devel
Hi,
It may be my misunderstanding, but it seems that the na.action in the
princomp() function for principal components analysis does not work. Please
see this simple example:
u - matrix(rnorm(75), ncol=1)
v - matrix(rnorm(20), ncol=1)
x - u%*%t(v) + matrix(rnorm(20*75),ncol=20)
x[1,1] - NA
This uses the idea of Kahan's summation, if I am not mistaken.
http://en.wikipedia.org/wiki/Kahan_summation_algorithm
Ravi
From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf
of Joshua Ulrich [josh.m.ulr...@gmail.com]
Sent:
I am also able to reproduce this problem on Windows:
library(eiginv)
n - 33 # problem does not arise for n = 32
evals - sort(rnorm(n))
system.time(A - eiginv(evals, symmetric=TRUE))
all.equal(evals, sort(eigen(A+0i,,TRUE)$val))
cbind(evals, sort(eigen(A+0i,,TRUE)$val))
Best,
Ravi
Dear Martin,
I am not sure I like this idea of expanding the interval. It can have bad
consequences. The best feature of uniroot is that it makes the user think
about the behavior of the function. Your suggestion is in the spirit of making
him unthink (if there is such a word!).
Here is a
This is getting further away from typical R-devel issues, but let me add
another perspective: the `n' in BIC reflects the rate at which the information
in the log-likelihood grows.
Ravi
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
I think that we should use P .03 (which approximates the probability of 5
consecutive heads) for assigning significance!
Ravi
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
Behalf Of Frank Harrell
Sent: Tuesday, February 12, 2013 9:43
They are reaching for the stars. Pardon my jest, but I couldn't resist.
Ravi
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
Behalf Of Uwe Ligges
Sent: Tuesday, February 12, 2013 10:01 AM
To: Frank Harrell
Cc: r-devel@r-project.org
I am not sure that this query is appropriate for r-devel, it seems to be more
appropriate for r-help.
In any case, you might want to try MASS::ginv instead of solve(), if you
expect ill-conditioning. Here is one possible solution:
f - function(X) {
invX - tryCatch(ginv(X,
Can you provide a correct/sensible example that illustrates the problem?
Your gradient function is wrong. So, how do you expect the algorithms to work?
Why is the gradient Inf when |x| 1.e-5? It should be 0.
Here the following works fine:
require(optimx)
f - function (x) {
if(is.na(x))
Thanks, Tom, for the reply as well as to the reference to Claeskens Hjort.
Ravi
From: Thomas Lumley [tlum...@uw.edu]
Sent: Thursday, May 03, 2012 4:41 PM
To: Mark Leeds
Cc: Ravi Varadhan; r-devel@r-project.org
Subject: Re: [Rd] The constant part
model gives lower BIC value. Hadn't though about it
before, have to be more careful in future when checking results from different
packages etc.
Jouni
On Tue, May 1, 2012 at 4:51 PM, Ravi Varadhan rvarad...@jhmi.edu wrote:
This is not a problem at all. The log likelihood function
This is not a problem at all. The log likelihood function is a function of the
model parameters and the data, but it is defined up to an additive arbitrary
constant, i.e. L(\theta) and L(\theta) + k are completely equivalent, for any
k. This does not affect model comparisons or hypothesis
hoping that such
basic operations would be part of base distribution.
Ravi
-Original Message-
From: oliver [mailto:oli...@first.in-berlin.de]
Sent: Thursday, April 19, 2012 2:34 PM
To: Ravi Varadhan
Cc: r-devel@r-project.org
Subject: Re: [Rd] Column(row)wise minimum and maximum
On Thu
, 2012 3:57 PM
To: Ravi Varadhan
Cc: oliver; r-devel@r-project.org
Subject: Re: [Rd] Column(row)wise minimum and maximum
This is why the matrixStats package was created, cf.
http://cran.r-project.org/web/packages/matrixStats/
1. Yes, it would be nice to have them in one of the default packages.
2
Hi,
Let X = (x_1, x_2, ... , x_p) be multivariate normal with mean, mu = (mu_1,
... , mu_p) and covariance = Sigma. I was looking for an R function to compute
conditional mean and conditional variance of a given subset of X given another
subset of X. While this is trivially easy to do,
-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf
of Ravi Varadhan [rvarad...@jhmi.edu]
Sent: Sunday, March 04, 2012 10:32 AM
To: r-devel@r-project.org
Subject: [Rd] Conditional means and variances of a multivariate normal
distribution
Hi,
Let X = (x_1, x_2, ... , x_p
A couple of (lengthier!) suggestions: topic-area resources or task-oriented
resources
Ravi
From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf
of Patrick Burns [pbu...@pburns.seanet.com]
Sent: Monday, February 13, 2012 4:32 AM
Varadhan
Cc: 'cbe...@tajo.ucsd.edu'; r-de...@stat.math.ethz.ch; 'nas...@uottawa.ca'
Subject: Re: [Rd] An example of very slow computation
On Aug 17, 2011, at 23:24 , Ravi Varadhan wrote:
A principled way to solve this system of ODEs is to use the idea of
fundamental matrix, which is the same
than that in Matrix package.
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
(and negative).
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
Take a look at the `nmk' function indfoptim package.
Ravi.
From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf
of Kellner [ralf.kell...@wiso.uni-erlangen.de]
Sent: Tuesday, July 19, 2011 1:33 PM
To: r-devel@r-project.org
Subject:
Indeed, Dirk, but realistic, I might add!
BTW, I enjoyed some of the Gaussian Facts.
My favorite: It only takes Gauss 4 minutes to sing Aleph-Null Bottles of Beer
on the Wall.
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor
)
# but this doesn't work
rm(a)
adaptIntegrate(function(x, argA=a) f(x, a=argA), lower=0, upper=2, a=0.2)
# Use of Curry
adaptIntegrate(Curry(f, a=0.2), lower=0, upper=2)
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division
Thanks, Hadley. This (i.e., different ways to prepare curry) is quite
instructive to me.
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins
University
Ph
is any good? The simple and best solution is to understand your
integrand as best as you can. I realize that this may be viewed as being
too pedantic, but unfortunately, it is also the best advice.
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant
that can handle linear/nonlinear and
equality/inequality constraints.
John, thanks for raising an important issue.
Thanks Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School
.
---
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: dmba...@gmail.com [mailto:dmba...@gmail.com
The decision about whether it belongs in a package or in base R is
about who should maintain the code.
Ok. I understand it now.
Thanks,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
.
---
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-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org
Hi Troy,
I think that your problem is poorly scaled. You have variables that vary
over several orders of magnitude. This means that any small changes (due to
subtle differences between R versions) could cause a big difference in the
convergence behavior of the algorithms. So, you are asking for
=Rates)$estimate
This should work quite robustly under various R versions on different
platforms.
Ravi.
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
On Behalf Of Ravi Varadhan
Sent: Wednesday, October 13, 2010 9:27 AM
To: 'Troy Robertson
.
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: Troy Robertson troy.robert...@aad.gov.au
Date: Wednesday
I completely agree with you, John. In my view, there is no need for
explicit RTFM or GLOG statements.
Best,
Ravi.
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
On Behalf Of P J JAYNES
Sent: Friday, August 20, 2010 4:40 PM
To:
Hi Christophe,
I have an algorithm for solving nonlinearly constrained optimization. It is
a combination of an interior point (for inequalities) algorithm with an
augmented Lagrangian (for equalities). It is coded entirely in R, and hence
is a bit slow, but it seems to do the job quite robustly
the old
and new versions of `constrOptim'.
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
Nolan,
You are correct that there is inconsistency. The feasible region should be ui
%*% theta - ci 0, so that log(ui %*% theta - ci) is defined.
There is a more serious problem in termination criterion for iterations:
if (is.finite(r) is.finite(r.old) abs(r - r.old)/(outer.eps +
be desirable if Tom Lumley can commit these changes to constrOptim.
In the meanwhile, I can send the function with these upgrades to anyone who is
interested.
Best,
Ravi.
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
Behalf Of Ravi Varadhan
:
if (obj obj.old * sign(mu)) break
Ravi.
-Original Message-
From: Ravi Varadhan [mailto:rvarad...@jhmi.edu]
Sent: Thursday, June 17, 2010 10:55 AM
To: 'Ravi Varadhan'; 'Duncan Murdoch'; 'John Nolan'
Cc: 'r-devel@r-project.org'
Subject: RE: [Rd] constrOptim( ): conflict between help page
.
--
Ravi Varadhan, Ph.D.
Assistant Professor,
Center on Aging and Health,
Johns Hopkins University School of Medicine
(410)502-2619
rvarad...@jhmi.edu
http://www.jhsph.edu/agingandhealth/People/Faculty_personal_pages/Varadhan.h
tml
[[alternative
will get lost in a sea of 2200+ packages.
Best regards,
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
).
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
---BeginMessage---
Dear Ravi
- pnorm(Xb)))
ans2 - apply(cbind(Xb, Resp), 1, function(x) pnorm(x[1], lower.tail=x[2],
log.p=TRUE))
all.equal(ans1, as.numeric(ans2))
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine
'
argument. So, apart from `control' and `hessian' you cannot pass any other
argument to optim.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine
an
extension of constrOptim that can use numerical gradients, and can also
handle nonlinear constraints.
Hope this helps,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division
.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph: (410) 502-2619
Fax: (410) 614-9625
Email: rvarad...@jhmi.edu
Webpage:
http://www.jhsph.edu
.
Thanks very much to all, especially to, Martin Maechler.
Best,
Ravi.
-Original Message-
From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
Sent: Wednesday, August 05, 2009 3:35 AM
To: John Nolan
Cc: Ravi Varadhan; hwborch...@googlemail.com; r-de...@stat.math.ethz.ch
Subject: Re
.
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: John Nolan jpno...@american.edu
Date
.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph: (410) 502-2619
Fax: (410) 614-9625
Email: rvarad...@jhmi.edu
Webpage:
http://www.jhsph.edu/agingandhealth
-step derivative could not be implemented in R.
Thanks,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
if there is a way to obtain accurate small
imaginary part for complex arithmetic.
I am using Windows XP operating system.
Thanks for taking a look at this.
Best regards,
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division
this be of interest to the R group?
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph: (410) 502-2619
71 matches
Mail list logo