If you have any specific features of the time series of soil moisture, you
could either model that or directly estimate it and test for differences in the
4 treatments. If you do not have any such specific considerations, you might
want to consider some nonparametric approaches such as function
In the limit as x goes to infinity, the integrand x f(x) should go to 0
sufficiently fast in order for the integral to be finite. The error indicates
that the integrand becomes infinite for large x. Check to ensure that the
integrand is correctly specified.
I don't understand how you can repla
I am not sure, but this thread from a couple of months ago might be relevant
(and useful):
https://stat.ethz.ch/pipermail/r-help/2011-March/273423.html
Ravi.
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] on behalf of
Rob Carnell [car
ay 31, 2011 4:41 PM
To: Ravi Varadhan
Cc: Bentley Coffey; Vincy Pyne; r-help@r-project.org
Subject: Re: [R] Value of 'pi'
On Wed, Jun 1, 2011 at 2:12 AM, Ravi Varadhan wrote:
>
> I have also heard (courtesy: John Nash) that `pi' is the ratio of actual time
> it takes t
It is the same thing (simply multiply the polynomial by the LCM and you have a
polynomial with integer coefficients).
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins
plete your thesis to the anticipated time.
I have also heard that March 14 is the official `pi' day in the US (probably
not in Indiana!).
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology Sch
Here is the wiki entry on the "Indiana Pi Bill"
http://en.wikipedia.org/wiki/Indiana_Pi_Bill
Ravi.
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
bill.venab...@csiro.au [bill.venab...@csiro.au]
Sent: Monday, May 30, 2011 2:
Yes, you are right that the results of smooth.spline are slightly worse than
that of sm.spline.
The Doppler function is "tricky". At small `x' values, it oscillates rapidly.
Hence it is not surprising that the smoothers do not do as well.
Here is a noisy version of your Doppler function.
Use the smooth.spline() function in "stats" package. This is more stable.
?smooth.spline
Ravi.
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
guy33 [david.res...@magd.ox.ac.uk]
Sent: Sunday, May 29, 2011 1:30 PM
To: r-hel
t;x", ylab="First derivative")
yexact <- -0.2 * 2*pi * cos(2*pi*x) * exp(-0.2 * sin(2*pi*x))
lines(x, yexact, col=2)
# Similarly, you can also look at the smoothed second derivative
Hope this is helpful,
Ravi.
---
Ravi Var
Why does this not find a better solution?
> x <- seq(0,2*pi, length=1000)
> x <- cbind(x/(2*pi), sin(x))
> fit1 <- principal.curve(x, plot = TRUE, trace = TRUE, maxit = 100,
+ start = cbind(sort(x[,1]), rep(1, nrow(x
Starting curve---distance^2: 1499.5
Iteration 1---distance^2: 3.114789
Itera
t know what is
wrong with bobyqa in this example.
In short, even with scaling and exact gradients, this optimization problem is
recalcitrant.
Best,
Ravi.
____
From: Mike Marchywka [marchy...@hotmail.com]
Sent: Thursday, May 12, 2011 8:30 AM
To: Ravi Varadhan; pda.
It should not be very hard to find information on optimization. Have you tried
any of the search facilities in R?
?optim # comes with `base'
library(optimx) # you need to install this first from CRAN
Ravi.
From: r-help-boun...@r-project.org [r-help-boun
Look at the solve.QP() function in the "quadprog" package.
Ravi.
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
vioravis [viora...@gmail.com]
Sent: Monday, May 09, 2011 10:46 PM
To: r-help@r-project.org
Subject: [R] SQP wi
The option `iter.max' should be an element of the Control list. If you read
the help file carefully, you would have noticed this. So, try this:
f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, link='identity',
control=list(iter.max=200), x=TRUE, y=TRUE)
Identity link is challenging to fit
x <- 1:5
rev(cumprod(rev(x)))
> rev(cumprod(rev(x)))
[1] 120 120 60 20 5
>
Ravi.
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
pwldk [pw...@hotmail.com]
Sent: Saturday, May 07, 2011 12:37 PM
To: r-help@r-project.org
Su
There is something strange in this problem. I think the log-likelihood is
incorrect. See the results below from "optimx". You can get much larger
log-likelihood values than for the exact solution that Peter provided.
## model 18
lnl <- function(theta,y1, y2, x1, x2, x3) {
n <- length(y1)
Beta is not as general as you think. Its support is limited to [0,1], but you
are trying to fit data that lies outside of its support. Please read about the
beta distribution from a basic stats/prob book.
Ravi.
From: r-help-boun...@r-project.org [r-he
.
---
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-project.org [mailto:r-help-boun...@r
maxBHHH is *not* an in-built R function. It is in a distributed package called
"maxLik". Always tell us which package is being used so that it is easier for
us to help you.
The error message says that the gradient function is returning a 10 x 2 matrix,
whereas you say that you have 1000's of
Ok, I get it.
require(cubature)
f <- function(x, a) cos(2*pi*x*a) # a simple test function
# this works
a <- 0.2
adaptIntegrate(function(x, argA=a) f(x, a=argA), lower=0, upper=2)
# but this doesn't work
rm(a)
adaptIntegrate(function(x, argA=a) f(x, a=argA), lower=0, upper=2, a=0.2)
Ravi.
__
Your simulation example is bad. You cannot fit a beta distribution to a data
that is not in [0,1], leave alone negative data.
x <- runif(1007)
fitdistr(x, "beta", start=list(shape1=0.5, shape2=0.5))
But try this instead:
x <- runif(100, 1, 27)
fitdistr(x, "beta", start=list(shape1=0.5, shap
Hi Carl,
Here is another slightly different (not necessarily the easiest) approach that
uses a profiling technique. An advantage is that you get the maximum location
directly.
n <- 20
x <- sort(rnorm(n))
y <- sort(rnorm(n))
xy <- expand.grid(x, y)
zfn <- function(x) 0.5 - 2.2 * (x[1] - 0.5)
You may want to consider spatial::surf.ls
Or, a simplistic approach where you fit a model such as using `lm':
E[Z | x, y] = a + b(x - x0)^2 + c(y - y0)^2
where (x0, y0) is the location of maximum.
Ravi.
From: r-help-boun...@r-project.org [r-help-boun.
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-project.org [mailto:r
Surely you must be joking, Mr. Jianfeng.
---
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
the
Wronskian, but was just wondering whether it is an established matrix that is
some kind of an *ian* like Hermitian, Jacobian, Hessian, Wronskian, Laplacian,
...
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of
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
Julian,
You have not specified your problem fully. What is the nature of f? Is f a
scalar function or is it a vector function (2-dim)?
Here are some examples showing different possibilities:
(1) y1 = f + e1 = a + b*exp(-c*x) + e1; y2 = f + e2 = a + b*exp(-c*x) + e2;
(e1, e2) ~ bivariate norm
I gave a solution previously with integer elements. It also works well for
real numbers.
rowMatch <- function(A,B) {
# Rows in A that match the rows in B
# The row indexes correspond to A
f <- function(...) paste(..., sep=":")
if(!is.matrix(B)) B <- matrix(B, 1, length(B))
a <- do.cal
Here is one solution:
rowmatch <- function(A,B) {
# Rows in A that match the rows in B
f <- function(...) paste(..., sep=":")
if(!is.matrix(B)) B <- matrix(B, 1, length(B))
a <- do.call("f", as.data.frame(A))
b <- do.call("f", as.data.frame(B))
match(b, a)
}
A <- matrix(1:1000
If you had told us what the error message was, my job would have been easier.
But, at least you provied the code, so it was not hard for me to see where the
problem was. There is a problem with the strategy used by `qmvnorm' to locate
the initial interval in which the quantile is supposed to l
Generate random numbers from a multinomial.
?rmultinom
# The following will generate n multinomial vectors each of size m
rmultinom(n, size=m, prob=m^(-1/8)) # you need to specify probabilities
appropriately
Ravi.
From: r-help-boun...@r-project.org [r-he
Bill's code is insanely fast!
f2 <- function(x, y) length(y) - findInterval(-x, rev(-sort(y)))
n1 <- 1e07
n2 <- 10^c(1,2,3,4,5,6,7)
tt <- rep(NA, 7)
x <- rnorm(n1)
for (i in 1:length(n2)){
y <- runif(n2[i])
tt[i] <- system.time(a1 <- f2(x, y))[3]
}
> tt
[1] 0.70 0.86 1.03 1.28 1.54 4.99
It does. See `lower' and `upper' arguments.
Why are y and z not known? Say, you want the marginal of x, i.e. integrate
over x. Now, y and z are fixed. You fix them at different values, but they
are known.
Ravi.
---
Ravi Vara
?integrate
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
cindy Guo [cindy.g...@gmail.com]
Sent: Friday, April 08, 2011 9:21 PM
To: r-help@r-project.org
Subject: [R] integration
Hi, All,
I have a density function with 3 v
Try this:
pred <- pred/1e06
DV <- DV/1e03
opt1 <- optim(fn=my.function, par=1.0)
opt2 <- optim(fn=my.function, par=1.0, method="BFGS")
opt3 <- optim(fn=my.function, par=1.0, method="L-BFGS-B", lower=0, upper=1)
opt1
opt2
opt3
Ravi.
-
ct.
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: Ravi Varad
You get 0 because you did not specify lower and upper bounds that define the
hyper-rectangle; therefore, the default is used which is (0,1)^4.
Specify the proper lower and upper bounds.
Ravi.
Ravi Varadhan, Ph.D.
Assistant
TRUE)
rtrg.1 <- cbind(pmin(tmp[,1], tmp[,2]), abs(tmp[,1] - tmp[,2]),1 -
pmax(tmp[,1], tmp[,2]))
})
all.equal(rtrg, rtrg.1)
Now, how can we use vis.test to test differences between these?
Best,
Ravi.
____
Ravi Varadhan, Ph.D.
Assi
t;- runif(3)
rtrg2[i, ] <- tmp/sum(tmp)
}
par(mfrow=c(2,1))
triplot(rtrg) # Looks more uniformly distributed
triplot(rtrg2, col=2) # Corners are sparsely populated
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of
The following one-liner generates uniformly distributed 3-tuples that sum to 1:
diff(c(0, sort(runif(2)), 1))
More, generally you can generate n-tuples that sum to unity as:
diff(c(0, sort(runif(n-1)), 1))
Ravi.
Ravi
mp; u1 <=
z2) & (u2 > 4 & u2 <= z2)
ff <- ifelse (reg.nonzero, u1*(z1-u1)*u2*(z2-u2)*exp(-0.027*(12-z2)), 0)
return(ff)
}
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontolo
That is essentially zero, because you are so far out in the left tail of the
distribution. So, you can ignore the negative sign and treat it as zero.
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric
Ben,
I am a huge fan of the old-fashioned and low-tech `cat'; it is good to know
that I am not alone in this!
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns
Ho
You might want to use `trace' and/or other debugging options to better
understand when and why this happens.
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Med
R prediction experts.
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
-Original M
This is no longer on CRAN. Try one of the other constrained optimization
packages: "Rsolnp" or "alabama"
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Me
o
accomplish this.
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-project.org [mailto:r-help-
Take a look at pvladens() function in "bootruin" package.
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-
iple optima, you can get different answers from properly
converged iterations.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns
Hopkins University
Ph. (410) 502-2619
email
s.
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: Yann PĂ©riar
t;Mean relative difference: 1.463598"
The results from `offset' are correct, i.e. lp2 can be readily verified to be
equal to 0.05 * (age - ph.karno). I don't know how lp1 is computed.
Ravi.
Ravi Varadhan, P
nging criticisms. Mark, by
reacting to the comments in a personal manner, I am afraid that you are the
loser.
Best,
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Med
separation
using a minorization inequality, and hence the problem simplifies greatly.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns
Hopkins University
Ph. (410) 502
Dear Bill - your solution works beautifully. Thank you very much.
David - thank you as well for your solution. It also works.
Best regards,
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and
Nope - that does not work. The value of last.warning is not reset after the
initial NULL.
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins
May be I could do:
for (i in 1:nsim) {
last.warning <- NULL
# do model fitting
if(!is.null(last.warning)) # discard simulation result
}
I think this might work. Any other ideas?
Ravi.
____
Ravi Varadhan, Ph.D.
Assist
etect warnings.
Any pointers would be appreciated.
Thanks,
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
email: r
c(0.1, 0.1, 2.5),control=list(trace=TRUE))
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: rvarad...@jhmi.e
e changes, you might want to try
optimizing using "optimx" package, as it will try various optimization
tools. Hopefully, some of them will be successful.
If you send the data test$A, we might be able to help you better.
Hope this helps,
Ravi.
-
?duplicated
This will identify common locations where duplications occur:
duplicated(a) & duplicated(b)
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns
Hop
u plotted the amount of learning on the Y-axis and
time on the X-axis, a steep learning curve means that one learns very quickly,
but this is just the opposite of what is actually meant.
Best,
Ravi.
____
Ravi Varadhan, Ph.D.
ntrol option as
`all.methods=TRUE' to get all the 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
uld be the "optimx" package,
which unifies a large number of optimiaztion tools under one umbrella.
Hope this helps,
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
Scho
Look at the "optmatch" package.
____
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
of the matrix, (A + t(A))/2.
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
- Original Message -
From: Spencer Graves
Date: Sunday,
timization algorithm of your choice
without having to worry about the names of the control parameters.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins
University
You are missing basic algebra skills!
You had:
myfunc<- function(x) {0.25*(9*x^4 + 6*x^2 + 1)}
This should be:
myfunc<- function(x) {0.25*(9*x^4 - 6*x^2 + 1)}
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Ger
"Conclusion: try to be/become a good scientist: with a high prevalence of
good ideas."
Or, I would say: "try to publish only good and mature ideas". Gauss said
it best "pauca sed matura" or "few, but ripe."
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: Spencer Graves [mailto:spencer.gra...@structuremonitoring.com]
Sent
in an open learning environment. Unless, we can achieve this
we cannot solve the problems of publication bias and inefficient and
sub-optimal use of data.
Best,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and G
such that the solution is bounded as t goes to infinity.
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..
e
solution at any given `t' in one shot, rather than having to march through
time from t=t0 to t=t. Numerical time-marching schemes make more sense for
systems of nonlinear ODEs.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Divisi
pe this is helpful,
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-pr
incomplete beta function
would not work, which is why I had to develop the power series approach.
Let me know how this works for you.
Ravi.
____
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
lt;- 0.5
k2 <- 1.5
Rm <- 2
R0 <- 0.2
system.time(y <- sapply(t, function(t) logistic.soln(t, k1, k2, Rm, R0)))
plot(t, y, type="l")
Hoep this helps,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geria
and
then integrate each term of the expansion. However, this is not very helpful
as I don't know what this series converges to.
May be I am missing something simple here? Any ideas?
Ravi.
-------
Ravi Varadhan, Ph.D.
Assistant Professor,
Division
I would prefer:
round(log10(x))
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
Hi Benjamin,
If you just had abs(x_i) < c_i, it will reduce to linear inequalities, but
your constraint cannot be reduced to that.
You might try "alabama" or "Rsolnp" packages.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant
-optimize(f,int=c(-10,10), tol=1.e-07)$min
} #
results
all.equal(results, -colSums(data)/2)
Hope this helps,
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns
Hopkins
alues)?
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: Chris
No, Spencer. Nash-Sutcliff efficiency is due to John E. Nash. It is
unrelated to game theory.
The well-known Nash equilibrium in game theory is due to John Forbes Nash,
Jr.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of
I think Christophe Dutang is writing a package for generalized Nash
Equilibria models called "GNE".
I am cc'ing him here.
I don't know if there are other packages out there. Christophe would know.
Ravi.
---
Ravi Varad
al interval [0, x], and see if this procedure can be
improved.
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:
.
---
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-project.org [mailto:r-help-boun...@r
tegrate'.
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-project.org [mai
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 Medi
en initial values).
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-h
,
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
atives
from the smooth
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
`spg' in "BB" may be useful.
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
-Origin
surmise.
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: Jonathan Phillips <994p.
elps,
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: Jonathan Phillips <994p...@gmail.com&
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 Me
the profile 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 Va
Hi Michael,
You do not need a numerical solver for this. This is a linear system of
ODEs and it admits closed form solutions. The solution is given as:
Y(t) = c_1 * v_1 * exp(k_1 * t) + ... + c_4 * v_4 * exp(k_4 * t)
where k_1, ..., k_4 are the eigenvalues (can be real or complex) and v_1,
...
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
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.
I am not surprised that you are running into difficulties with this model
estimation, since you are treating a constrained optimization problem as
unconstrained one. It is not so easy to set constraints on the covariance
matrix (i.e. positive definiteness). The is the beauty of the EM algorithm
i
101 - 200 of 694 matches
Mail list logo