Hi all,
Is there a way to do a matrix multiplication in a faster way?
I am making a product of a matrix (composed of a lot of dummy variables) and a
vector, and is there any way to make it faster?
The simple X %*% y takes too long a time.
I know using sparse matrix would help, but don't
Hi,
Is it possible to assign to an array with different dimensions?
That is to say, supposing a three dimensional array,
the third dimension of the array has matrices of different sizes?
array
, , 1
[1] [2] [3]
[1] 111
, , 2
[1] [2] [3]
[1] 111
[2] 11
of the main loop
you will probably see an increase in performance.
2009/11/2 parkbomee bbom...@hotmail.com:
This is the Rprof() report by self time.
Is it also possible that these routines, which take long self.time, are
causing the optim() to be slow?
$by.self
...@gmail.com; r-help@r-project.org
Subject: Re: [R] avoiding loop
From: mtmor...@fhcrc.org
Date: Sun, 1 Nov 2009 22:14:09 -0800
parkbomee bbom...@hotmail.com writes:
Thank you all.
What Chuck has suggested might not be applicable since the number of
different times is around 40,000
it).
On Sat, Oct 31, 2009 at 11:36 PM, parkbomee bbom...@hotmail.com wrote:
Thank you both.
However, using tapply() instead of a loop does not seem to improve my code
much.
I am using this inside of an optimization function,
and it still takes more than it needs...
CC: bbom
Hi all,
I am trying to figure out a way to improve my code's efficiency by avoiding the
use of loop.
I want to calculate a conditional mean(?) given time.
For example, from the data below, I want to calculate
sum((value|choice==1)/sum(value)) across time.
Is there a way to do it without using
})
I hope it helps.
Best,
Dimitris
parkbomee wrote:
Hi all,
I am trying to figure out a way to improve my code's efficiency by
avoiding the use of loop.
I want to calculate a conditional mean(?) given time.
For example, from the data below, I want to calculate sum
Hi all,
I am trying to estimate a simple logit model.
By using MLE, I am maximizing the log likelihood, with optim().
The thing is, each observation has different set of choice options, so I need a
loop inside the objective function,
which I think slows down the optimization process.
The
: r-help@r-project.org
Subject: Re: [R] Efficient way to code using optim()
From: gpet...@uark.edu
Unless this is a homework problem, you would be much better off using
glm().
Giovanni
Date: Fri, 30 Oct 2009 12:23:45 -0700
From: parkbomee bbom...@hotmail.com
Sender: r-help-boun
Hi everyone,
I am running this fixed effects model in R.
The thing is, my own code and the canned routine keep returning different
estimates for the fixed effects factors and intercept.
(The other variables' estimates and R^2 are the same!!! weird!!)
I attach my own code, just in case.
I am
10 matches
Mail list logo