Dear Henrik,
Thank you! This is quite helpful, especially your longer blog post.
Best regards,
Ravi
From: Henrik Bengtsson
Sent: Sunday, July 2, 2023 4:33 AM
To: Ravi Varadhan
Cc: R-Help
Subject: Re: [R] Number of Cores limited to two in CRAN
External
This is the specific error messsage from R CMD check --as-cran
Error in .check_ncores(length(names)) : 16 simultaneous processes spawned
Calls: prepost -> makeCluster -> makePSOCKcluster -> .check_ncores
Execution halted
Thanks,
Ravi
____
From: Ravi
Hi,
I am developing a package where I would like to utilize multiple cores for
parallel computing. However, I get an error message when I run R CMD check
--as-cran.
I read that CRAN limits the number of cores to 2. Is this correct? Is there
any way to overcome this limitation?
Thank you,
Rav
regards,
Ravi
From: John Fox
Sent: Thursday, October 7, 2021 2:00 PM
To: Ravi Varadhan
Cc: R-Help
Subject: Re: [R] How to use ifelse without invoking warnings
External Email - Use Caution
Dear Ravi,
It's already been suggested that you could disable w
Hi,
I would like to execute the following vectorized calculation:
ans <- ifelse (k >= -1 & k <= n, pbeta(p, k+1, n-k, lower.tail = FALSE),
ifelse (k < -1, 0, 1) )
For example:
> k <- c(-1.2,-0.5, 1.5, 10.4)
> n <- 10
> ans <- ifelse (k >= -1 & k <= n, pbeta(p,k+1,n-k,lower.tail=FALSE), ifels
I agree with John that SANN should be removed from optim.
More importantly, the default choice of optimizer in optim should be changed
from "Nelder-Mead" to "BFGS." Nelder-Mead is a bad choice for the most
commonly encountered optimization problems in statistics. I really do not see
a good
Does Microsoft open R come with pre-compiled BLAS that is optimized for matrix
computations?
Thanks,
Ravi
-Original Message-
From: Ista Zahn
Sent: Monday, August 13, 2018 3:18 PM
To: Ravi Varadhan
Cc: r-help@r-project.org
Subject: Re: [R] Fast matrix multiplication
On Mon, Aug 13
Hi Ista,
Thank you for the response. I use Windows. Is there a pre-compiled version of
openBLAS for windows that would make it easy for me to use it?
Thanks,
Ravi
-Original Message-
From: Ista Zahn
Sent: Friday, August 10, 2018 12:20 PM
To: Ravi Varadhan
Cc: r-help@r-project.org
Hi,
I would like to compute: A %*% B %*% t(A)
A is a mxn matrix and B is an nxn symmetric, positive-definite matrix, where m
is large relative to n (e.g., m=50,000 and n=100).
Here is a sample code.
M <- 1
N <- 100
A <- matrix(rnorm(M*N), M, N)
B <- crossprod(matrix(rnorm(N*N), N
vect)), b=1, meq=1)))
Ravi
____
From: Ravi Varadhan
Sent: Saturday, May 5, 2018 12:31 PM
To: m.ash...@enduringinvestments.com; r-help@r-project.org
Subject: adding overall constraint in optim()
Hi,
You can use the projectLinear argument in BB::spg to optimize with linear
Hi,
You can use the projectLinear argument in BB::spg to optimize with linear
equality/inequality constraints.
Here is how you implement the constraint that all parameters sum to 1.
require(BB)
spg(par=p0, fn=myFn, project="projectLinear", projectArgs=list(A=matrix(1, 1,
length(p0)), b=1,
More principled would be to use a lasso-type approach, which combines selection
and estimation in one fell swoop!
Ravi
From: Ravi Varadhan
Sent: Tuesday, June 6, 2017 10:16 AM
To: r-help@r-project.org
Subject: Subject: [R] glm and stepAIC selects too many
If AIC is giving you a model that is too large, then use BIC (log(n) as the
penalty for adding a term in the model). This will yield a more parsimonious
model. Now, if you ask me which is the better option, I have to refer you to
the huge literature on model selection.
Best,
Ravi
[[
verge when you set a small tolerance
for convergence. You may fiddle with the control options for EM algorithm and
see if you can get convergence. If not, you should contact the package authors.
Hope this is helpful,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Pr
Hi,
Take a look at the package "ic.infer" by Ulrike Gromping.
https://www.jstatsoft.org/article/view/v033i10
Best,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor, Department of Oncology
Division of Biostatistics & Bionformatics
Standard error = sqrt(diag(solve(opt$hessian)))
Ravi
From: Alaa Sindi [mailto:alaasi...@icloud.com]
Sent: Wednesday, March 02, 2016 3:22 PM
To: Ravi Varadhan
Cc: r-help@r-project.org
Subject: Re: help in maximum likelihood
Thank you very much prof. Ravi,
That was very helpful. Is there a way
6, 63, 59, 62, 60)
# note: there is no need to have the choose(n, y) term in the likelihood
fn <- function(p)
sum( - (y*(p[1]+p[2]*x) - n*log(1+exp(p[1]+p[2]*x))) )
out <- nlm(fn, p = c(-50,20), hessian = TRUE)
out
eigen(out$hessian)
Hope this is helpful,
Ravi
Ravi Varadhan, Ph.D.
. Does anyone know of this or
worked with this data set? If so, can someone share it with me?
Thank you very much.
Best,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor, Department of Oncology
Division of Biostatistics & Bionformatics
Sidney Ki
te(fun, -Inf, t, nu=nu, exi=exi)$value
return(res)
}
uniroot(myroot, c(-2, 2), nu=2, exi=0.5, alpha=.05)
Ravi
From: Ravi Varadhan
Sent: Friday, January 08, 2016 11:29 AM
To: r-help@r-project.org; 'sstol...@gmail.com'
Subject: Re: Solve an equation including integral
I think t
05)
Hope this is helpful,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor, Department of Oncology
Division of Biostatistics & Bionformatics
Sidney Kimmel Comprehensive Cancer Center
Johns Hopkins University
550 N. Broadway, Suite -E
Baltimore, MD
_percent_of_CD4" and "Fr_II_percent_of_CD4".
How can I use grep() to do this?
More generally, are there any good online resources with examples like this for
the use of grep() and regexp() in R? I didn't find the help pages for these
very user-friendly.
Thank you very
mentations of Nelder-Mead.
Best regards,
Ravi
From: ProfJCNash
Sent: Sunday, November 15, 2015 12:21 PM
To: Ravi Varadhan; 'r-help@r-project.org'; lorenzo.ise...@gmail.com
Cc: b...@xs4all.nl; Gabor Grothendieck
Subject: Re: Cautioning optim() user
Hi,
While I agree with the comments about paying attention to parameter scaling, a
major issue here is that the default optimization algorithm, Nelder-Mead, is
not very good. It is unfortunate that the optim implementation chose this as
the "default" algorithm. I have several instances wher
It seems like there is substantial finite-sample bias in the MLEs. Either that
or there is some error in your procedure. See attached code.
Ravi
From: Ravi Varadhan
Sent: Wednesday, November 11, 2015 2:33 PM
To: 'denizozo...@gazi.edu.tr' ; r-help@r-project.org
Cc: 'profj
t can still happen).
I would strongly suggest that when you are doing simulations, you should
encapsulate the parameter estimation inside a `try' or `tryCatch' statement so
that when there is an error, the simulation keeps going rather than crashing
out.
See the attached code.
Best,
Ravi
ail.com]
Sent: Tuesday, October 27, 2015 1:50 PM
To: Ravi Varadhan
Cc: r-help@r-project.org
Subject: Re: [R] How to get variable name while doing series of regressions in
an automated manner?
Marc,Ravi:
I may misunderstand, but I think Marc's solution labels the list components but
not nece
HS? In addition,
is there a better paradigm for doing these type of series of regressions in an
automatic fashion?
Thank you very much,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor, Department of Oncology
Division of Biostatistics & Bi
: Ravi Varadhan; r-help@r-project.org
Subject: Re: [R] Linear regression with a rounded response variable
> On 21 Oct 2015, at 19:57 , Charles C. Berry wrote:
>
> On Wed, 21 Oct 2015, Ravi Varadhan wrote:
>
>> [snippage]
>
> If half the subjects have a value of 5 second
ered. Any suggestions?
Thank you,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor, Department of Oncology
Division of Biostatistics & Bionformatics
Sidney Kimmel Comprehensive Cancer Center
Johns Hopkins University
550 N. Broadway, Suite -E
Baltimore
esday, October 6, 2015 9:20 AM
To: Ravi Varadhan
Cc: 'r-help@r-project.org'
Subject: Bug in auglag?
Hi Ravi,
I would like come back to your offer. I have a problem which possibly is
caused by a bug or by something I don't understand:
My function to be minimised is executed even when an
2015 3:37 AM
To: Ravi Varadhan
Cc: 'r-help@r-project.org'
Subject: Re: optimizing with non-linear constraints
Ravi Varadhan writes:
> Hi Rainer,
> It is very simple to specify the constraints (linear or nonlinear) in
> "alabama" . They are specified in a function
nction(x, LAI) {
h <- rep(NA, 2)
h[1] <- LAI^x[2] / x[3] + x[1]
h[2] <- 1 - x[1] - LAI^x[2] / x[3]
h
}
Please take a look at the help page. If it is still not clear, you can contact
me offline.
Best,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Profess
In solve.QP(), you don't need to expand the equality into two inequalities. It
can DIRECTLY handle the equality constraints. The first `meq' rows of the
constraint matrix are equality constraints. Here is the excerpt from the
documentation.
meq
the first meq constraints are treated as equali
What about numeric constants, like `163'?
eval(Pre(exp(sqrt(163)*pi), 120))does not work.
Thanks,
Ravi
From: David Winsemius
Sent: Saturday, July 4, 2015 1:12 PM
To: Duncan Murdoch
Cc: r-help; John Nash; Ravi Varadhan
Subject: Re: [R] : Rama
120), then all the constants, 163, pi, are automatically
of 120 bits precision.
Is this easy to do?
Best,
Ravi
From: David Winsemius
Sent: Friday, July 3, 2015 2:06 PM
To: John Nash
Cc: r-help; Ravi Varadhan
Subject: Re: [R] : Ramanujan and the accuracy o
matters in Rmpfr. Even if it does, the
answer you get is still wrong as you showed.
Thanks,
Ravi
-Original Message-
From: Richard M. Heiberger [mailto:r...@temple.edu]
Sent: Thursday, July 02, 2015 6:30 PM
To: Aditya Singh
Cc: Ravi Varadhan; r-help
Subject: Re: [R] : Ramanujan and the
Hi,
Ramanujan supposedly discovered that the number, 163, has this interesting
property that exp(sqrt(163)*pi), which is obviously a transcendental number, is
real close to an integer (close to 10^(-12)).
If I compute this using the Wolfram alpha engine, I get:
262537412640768743.25
Harold,
Obviously the bottleneck is your objective function fn(). I have speeded up
your function by a factor of about 2.4 by using `outer' instead of sapply. I
think it can be speeded much more. I couldn't figure it out without spending a
lot of time. I am sure someone on this list-serv
Yes, this is a very important point. Thank you, Bill.
Best,
Ravi
From: William Dunlap
Sent: Friday, February 13, 2015 4:56 PM
To: Ravi Varadhan
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] Unable to use `eval(parse(text))' in nlme::lme
> ff <-
)
dd <- subset(labdata2, Transplant_type!=0 & time >0)
lme(ff, random=~1|Patient, data=dd, correlation=corAR1(), na.action=na.omit)
Best,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor
Department of Oncology
Division of Biostatistics & Bionfor
Hi,
I would like to run lme() on a number of response variables in a dataframe in
an automatic manner. Bu, when I use eval(parse(text=yname)) to denote the LHS
of the formula in lme(), I get the following error message:
> require(nlme)
> mod2 <- with(subset(labdata2, Transplant_type!=0 &
Thursday, January 22, 2015 10:29 AM
To: Bert Gunter
Cc: William Dunlap; r-help@r-project.org; Ravi Varadhan
Subject: Re: [R] Re-order levels of a categorical (factor) variable
>>>>> Bert Gunter
>>>>> on Wed, 21 Jan 2015 18:52:12 -0800 writes:
> Bill/Rav
Hi,
I have a fairly elementary problem that I am unable to figure out. I have a
continuous variable, Y, repeatedly measured at multiple times, T. The variable
T is however is coded as a factor variable having these levels: c("Presurgery",
"Day 30", "Day 60", "Day 180", "Day 365").
When I plot
lems and it is quite difficult to know
a priori which one would be the best for "my" problem. Thus, the benchmarking
capability provided by optimx is a powerful feature.
Ravi
From: Ben Bolker
Sent: Thursday, January 15, 2015 9:29 AM
To: Rav
Hi,
I tried your problem with optimx package. I found a better solution than that
found by mle2.
?library(optimx)
# the objective function needs to be re-written
LL2 <- function(par,y) {
lambda <- par[1]
alpha <- par[2]
beta <- par[3]
R = Nweibull(y,lambda,alpha,beta)
-sum(log(R))
}
Hi,
You can try a projected gradient approach, which is implemented in the spg()
function in the "BB" package. You have to provide a projection function which
will take an infeasible matrix as input and will give a feasible (i.e.
positive-definite) matrix as output. This kind of matrix projecti
Dear All,
I am fitting a model for a binary response variable measured repeatedly at
multiple visits. I am using the binomial GLMM using the glmer() function in
lme4 package. How can I evaluate the model assumptions (e.g., residual
diagnostics, adequacy of random effects distribution) for a b
Thank you. It is very helpful.
Ravi
-Original Message-
From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
Sent: Monday, July 07, 2014 4:15 PM
To: Ravi Varadhan
Cc: r-help@r-project.org
Subject: Re: [R] Box-cox transformation
Dear Ravi,
In my previous example, I used the residuals, so
Hi,
I am trying to do Box-Cox transformation, but I am not sure how to do it
correctly. Here is an example showing what I am trying:
# example from MASS
require(MASS)
boxcox(Days+1 ~ Eth*Sex*Age*Lrn, data = quine,
lambda = seq(-0.05, 0.45, len = 20))
# Here is My attempt at getting t
en maximum and minimum candidates for referees
is 13 - 3 = 10. Of course, I have to increase the # iters to get a better
solution, but for large K and R this may not converge at all.
Best regards,
Ravi
From: Ravi Varadhan
Sent: Wednesday, April 30, 2014 1:49 PM
To: r-help@r-project.org
Subject: A co
hursday, May 01, 2014 10:46 AM
To: Ravi Varadhan
Cc: r-help@r-project.org; djnordl...@frontier.com
Subject: Re: A combinatorial assignment problem
Ravi:
You cannot simultaneously have balance and guarantee random mixing.
That is, you would need to specify precisely what you mean by balance and
Hi,
I have this problem: K candidates apply for a job. There are R referees
available to review their resumes and provide feedback. Suppose that we would
like M referees to review each candidate (M < R). How would I assign
candidates to referees (or, conversely, referees to candidates)? Th
Hi All,
I am using lattice::bwplot to plot the results of a subgroup analysis for
different simulation scenarios. I have 4 subgroups, 5 methods of estimating
treatment effect in subgroups, and 4 scenarios. I am plotting the subgroup
effect and its upper and lower CI.
I have 2 issues that I a
Hi,
I am using following R version:
> version
_
platform i386-w64-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 3
minor 0.1
year 2013
month 05
day16
svn rev62743
language
The optimization algorithms did converge to a limit point. But, not to a
stationary point, i.e. a point in parameter space where the first and second
order KKT conditions are satisfied. If you check the gradient at the solution,
you will see that it is quite large in magnitude relative to 0.
Carlos,
There are likely several problems with your likelihood. You should check it
carefully first before you do any optimization. It seems to me that you have
box constraints on the parameters. They way you are enforcing them is not
correct. I would prefer to use an optimization algorithm t
Hi Tony,
Did you try the `auglag' algorithm in "alabma" package?
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-project.or
Hi,
While using R CMD check I get the following Latex error message which occurs
when creating PDF version of manual:
LaTex error: File `inconsolata.sty' not found
I am using Windows 7 (64-bit) and R 3.0.1. I have MikTex 2.9.
I see that the incosolata.sty is present under \doc\fonts folder. How
Ravi Varadhan; 'r-help@r-project.org'
Subject: Re: [R] Vectorized code for generating the Kac (Clement) matrix
On 26-04-2013, at 14:42, Enrico Schumann wrote:
> On Thu, 25 Apr 2013, Ravi Varadhan writes:
>
>> Hi, I am generating large Kac matrices (also known as Clement mat
n - i + 1
for (i in 2:(n+1)) Kacmat[i, i-1] <- i-1
The above code is fast, but I am curious about vectorized ways to do this.
Thanks in advance.
Best,
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopk
Kathy,
You need to make sure that you have installed the latest version of `cmprsk'
package (version 2.2-4). crrstep will not work Otherwise.
Ravi
From: Ravi Varadhan
Sent: Thursday, March 28, 2013 5:25 PM
To: 'kathyhan...@gmail.com'
Cc: r-help@r-project.org
Subject: Re: [
Hi Kathy,
You should first contact the package maintainer (which is me!) before posting
to r-help. Which version of the package are you using? Can you send me a
minimally reproducible code?
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric
optimizers like alabama would
still NOT be good approaches. It would be easiest to just go through the
discrete values.
Ravi
From: Berend Hasselman [b...@xs4all.nl]
Sent: Monday, February 11, 2013 12:45 AM
To: Axel Urbiz
Cc: R-help@r-project.org; Ravi
auglag(par = rep(1,4), fn = ff, heq = heq)
Ravi
From: Axel Urbiz [axel.ur...@gmail.com]
Sent: Sunday, February 10, 2013 3:16 PM
To: R-help@r-project.org; Ravi Varadhan
Subject: Constrained Optimization in R (alabama)
Dear List,
I'm trying to solve this si
Axel Urbiz [axel.ur...@gmail.com]
Sent: Sunday, February 10, 2013 3:16 PM
To: R-help@r-project.org; Ravi Varadhan
Subject: Constrained Optimization in R (alabama)
Dear List,
I'm trying to solve this simple optimization problem in R. The parameters are
the exponents to the matrix mm. The c
- function(p, x, y) sapply(p, function(p) cor(y, x^p)^2)
plot(seq(0,5,length=1000), obj2(seq(0,5,length=1000),x,y), type="l")
Best,
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins University
I did not get any warnings when I ran your data/model example.
From: Fischer, Felix [mailto:felix.fisc...@charite.de]
Sent: Wednesday, January 30, 2013 11:19 AM
To: Ravi Varadhan
Cc: r-help@r-project.org
Subject: AW: [R] starting values in glm(..., family = binomial(link =log))
Thanks for your
Try this:
Age_log_model = glm(Arthrose ~ Alter, data=x, start=c(-1, 0),
family=quasibinomial(link = log))
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins University
rvarad...@jhmi.edu<mailto
: Sunday, December 02, 2012 5:04 PM
To: Ravi Varadhan
Cc: Adam Zeilinger (zeil0...@umn.edu); r-help@r-project.org
Subject: Re: [R] model selection with spg and AIC (or, convert list to fitted
model object)
Dear Ravi,
Thank you so much for the help. I switched to using the optimx function but I
Send us a reproducible R code that shows what you actually tried.
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins University
rvarad...@jhmi.edu<mailto:rvarad...@jhmi.edu>
410-502-2619
[[altern
ill not be deprecated unless you can vectorize
Brent's hybrid root-finding approach!
Best,
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins University
rvarad...@jhmi.edu<mailto:rvarad...@
You might also want to try the Nelder-Mead algorithm, nmk(), in the "dfoptim"
package. It is a better algorithm than the Nelder-Mead in optim. It is all R
code, so you might be able to modify it to fit your needs.
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging
Try optimx() in the "optimx" package with the control option
`all.methods=TRUE'.
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins University
rvarad...@jhmi.edu<mailto:rvarad...@
You have nonlinear constraints on the parameters. Take a look at constrained
optimization algorithms in packages "alabama" or "Rsolnp" that can handle
non-linearly constrained optimization problems.
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging an
Ravi
From: Vito Muggeo [vito.mug...@unipa.it]
Sent: Tuesday, October 16, 2012 9:55 AM
To: Bert Gunter
Cc: Véronique Boucher Lalonde; r-help@r-project.org; Ravi Varadhan
Subject: Re: [R] fit a "threshold" function with nls
Véronique,
in addition to Bert's comments, I wo
optimization are not using optimx. This is a very
powerful for benchmarking unconstrained and box-constrained optimization
problems. It deserves to be used widely, in my biased, but correct, opinion.
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric
solved:
require(BB)
proj.simplex <- function(y, c=1) {
#
# project an n-dim vector y to the simplex S_n
# S_n = { x | x \in R^n, 0 <= x <= c, sum(x) = c}
# Copyright: Ravi Varadhan, Johns Hopkins University
# August 8, 2012
#
n <- length(y)
sy <- sort(y, decreasing=TR
covariates, and then
converting the scaled coefficients back to the original scale? Of course, the
end user could do this just as easily!
Best,
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins Univer
Thank you, Peter. I don't know why I didn't think of this!
Also, thanks to Ilai.
Ravi
From: Peter Ehlers [ehl...@ucalgary.ca]
Sent: Tuesday, April 03, 2012 8:22 PM
To: ilai
Cc: Ravi Varadhan; r-help@r-project.org
Subject: Re: [R] A co
ite matrix since the original
matrix ought to be negative-definite.
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..
default method "BFGS" is better in this setting.
Hope this helps,
Ravi
-------
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins
University
Ph. (410) 502-2619
email:
boundary. Asymptotic distribution of
MLE estimators will not be normal in the case of convergence at the boundary.
This is a difficult problem.
Best,
Ravi
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
roving the convergence of a
sequence. This could be an explanation for the better performance, but I
cannot say for sure.
Hope this is helpful,
Ravi
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School o
here is also the issue of properly scaling your function, because it is
poorly scaled. Look how different the 2 parameters are - they are 7 orders of
magnitude apart. You are really asking for trouble here.
Hope this is helpful,
Ravi.
----
Hi,
You really need to study the documentation of "optim" carefully before you make
broad generalizations. There are several algorithms available in optim. The
default is a simplex-type algorithm called Nelder-Mead. I think this is an
unfortunate choice as the default algorithm. Nelder-Mea
Hi,
How can I get information on how many times a particular package has been
downloaded from CRAN?
Thanks,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins
argument.
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<mailto:rvarad...@jhmi.edu>
[[alternative
ction of w1'. This is a simple calculus
exercise, and I will leave this as a homework problem for you to solve!
Best,
Ravi.
-------
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns
lculate significance levels.
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<mailto:rvarad..
s will be close to zero
ans2$hessian
However, it is not known whether the standard errors obtained from this Hessian
are asymptotically valid.
Best,
Ravi.
-------
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Geronto
ical gradient is not sufficiently close to the
user-specified gradient.
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
these gradients to us?
In "optimx", we should probably change this into a "warning" rather than a
"stop".
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology Sc
distribution. What kind of bivariate coupla might work? Then, how to
generate from the conditional distribution [U | T]? Any thoughts?
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<mailto:rvarad...@jhmi.edu>
[[alternative HTML version d
ization algorithms.
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<mailto:rvarad...@jhmi.edu>
[[a
Kathie,
It is very difficult to help without adequate information. What does your
objective function look like? Are you maximizing (in which case you have to
make sure that the sign of the objective function is correct) or minimizing?
Can you try "optimx" with the control option all.methods=TR
Hi Michael,
The coefficients of ridge regression are given by:
\beta^* = (X'X + k I)^{-1} X' y, (1)
where k > 0 is the penalty parameter and I is the identity matrix.
The ridge estimates are related to OLS estimates \beta as follows:
\beta^* = Z \beta,
I did think of this solution, Keith, but I am generally uncomfortable (may be
"paranoid" is a better word) with the use of `<<-'. Perhaps, my fear is
unjustified in this particular situation.
Thanks,
Ravi.
-------
Ravi Vara
he 3-column matrix. It would be
nice, if there was a more direct way to get the numerical output, perhaps a
numeric option in capture.output().
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Ger
n the actual
numerical values. How can I do this?
Thanks very much for any suggestions.
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins
University
Ph. (410)
1 - 100 of 694 matches
Mail list logo