Displaying 20 results from an estimated 1000 matches similar to: "improve efficiency of a loop"
2015 Mar 08
0
Seed in 'parallel' vignette
On Tue, Feb 3, 2015 at 10:39 AM, Marius Hofert
<marius.hofert at uwaterloo.ca> wrote:
> Hi,
>
> This is most likely only a minor technicality, but I saw the
> following: On page 6 of the 'parallel' vignette
> (http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf),
> the random-number generator "L'Ecuyer-CMRG" is said to have seed
>
2015 Feb 03
2
Seed in 'parallel' vignette
Hi,
This is most likely only a minor technicality, but I saw the
following: On page 6 of the 'parallel' vignette
(http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf),
the random-number generator "L'Ecuyer-CMRG" is said to have seed
"(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer
et al. (2002), the seed is given with
2012 Jul 28
4
quantreg Wald-Test
Dear all,
I know that my question is somewhat special but I tried several times to
solve the problems on my own but I am unfortunately not able to compute the
following test statistic using the quantreg package. Well, here we go, I
appreciate every little comment or help as I really do not know how to tell
R what I want it to do^^
My situation is as follows: I have a data set containing a
2000 Sep 22
0
what do you do for 2SLS or 3SLS
For 2 or 3 stage least squares, what do you R folks do?
Follow-up question. My student wants to estimate this. 2 variables are
governed by a system of difference equations. His theory is like so.
Y_t and X_t are
state variables, we want estimates for a, g, b, and h.
X_(t+1) = 1 + a X_t + (a/K)* (X_t)^2 - g Y_t X_t
Y_(t+1) = b Y_t + h* X_t * Y_t
K is perhaps something to estimate, but it
2001 Oct 09
1
PROC MIXED user trying to use (n)lme...
Dear R-users
Coming from a proc mixed (SAS) background I am trying to get into
the use of (n)lme.
In this connection, I have some (presumably stupid) questions
which I am sure someone out there can answer:
1) With proc mixed it is easy to get a hold on the estimated
variance parameters as they can be put out into a SAS data set.
How do I do the same with lme-objects? For example, I can see the
2007 Aug 10
0
half-logit and glm (again)
I know this has been dealt with before on this list, but the previous
messages lacked detail, and I haven't figured it out yet.
The model is:
\x_{ij} = \mu + \alpha_i + \beta_j
\alpha is a random effect (subjects), and \beta is a fixed effect
(condition).
I have a link function:
p_{ij} = .5 + .5( 1 / (1 + exp{ -x_{ij} } ) )
Which is simply a logistic transformed to be between .5 and 1.
2005 Jun 14
1
within and between subject calculation
Dear helpers in this forum,
I have the following question:
Suppose I have the following data set:
id x y
023 1 2
023 2 5
023 4 6
023 5 7
412 2 5
412 3 4
412 4 6
412 7 9
220 5 7
220 4 8
220 9 8
......
and i want to calculate sum_{i=1}^k
sum_{j=1}^{n_i}x_{ij}*y_{ij}
is there a simple way to do this within and between
subject summation in R?
2003 Aug 30
1
3D plot of a bivariate normal distribution
Hi,
I've used the Mathematica to produce 3D graphics, contour plots of a
bivariate normal distribution
Now I want make these graphics in R, but i do not know how.
I would like to:
- Plot a 3D graph for some different variance matrix
- Plot the contour plots
- Find and try to plot (in the 3d graph ou contour plot) the (1-a)%
confidence region based in a chi-square(a) with the degrees of
2008 Jul 25
1
Matrix from List
Hello, I have a list in which each element is a list. I want to
create a matrix indexed by the two indices of the list. I have been
using do.call, but I am not getting what I want. Let me show you:
> l.intercepts #the list that nests another list
$`1995`
$`1995`$`31`
(Intercept)
25.37164
$`1995`$`33`
(Intercept)
26.66755
$`2006`
$`2006`$`31`
(Intercept)
25.86621
$`2006`$`33`
2006 Jan 25
1
xx-0.1.0 : xhtml and xml make it twice as dirty
NAME
xx - twice as dirty
SYNOPSIS
~ > gem install "double x"
require "xx"
include XX::XHTML
doc = xhtml_{
html_{
head_{ title_{ " go xx! " } }
body_{ " one more and it would be illegal " }
}
}
URI
http://rubyforge.org/frs/?group_id=1024
DESCRIPTION
xx is a library designed to extend ruby objects
2005 Jun 15
2
need help on computing double summation
Dear helpers in this forum,
This is a clarified version of my previous
questions in this forum. I really need your generous
help on this issue.
> Suppose I have the following data set:
>
> id x y
> 023 1 2
> 023 2 5
> 023 4 6
> 023 5 7
> 412 2 5
> 412 3 4
> 412 4 6
> 412 7 9
> 220 5 7
> 220 4 8
> 220 9 8
> ......
>
Now I want to compute the
2003 Sep 01
0
Re: Plotting bivariate normal distributions.
You'll find that it is a lot easier to do it in R:
# lets first simulate a bivariate normal sample
library(MASS)
bivn <- mvrnorm(1000, mu = c(0, 0), Sigma = matrix(c(1, .5, .5, 1), 2))
# now we do a kernel density estimate
bivn.kde <- kde2d(bivn[,1], bivn[,2], n = 50)
# now plot your results
contour(bivn.kde)
image(bivn.kde)
persp(bivn.kde, phi = 45, theta = 30)
# fancy contour with
2001 Jan 02
0
mdct explanation
...as promised.
This describes the mdct used in my d.m.l patch. I think it is the
same as the Lee fast-dct.
I typed it in a kind of pseudo-TeX, 'cause the ascii art would
kill me. Hope you can read TeX source; if not, ask someone who
can to make a .ps/.gif/.whatever of the TeX output, and put it
on a webpage or something. I'm to lazy to do it (and besides, I
don't have access to TeX,
2002 May 06
2
A logit question?
Hello dear r-gurus!
I have a question about the logit-model. I think I have misunderstood
something and I'm trying to find a bug from my code or even better from my
head. Any help is appreciated.
The question is shortly: why I'm not having same coefficients from the
logit-regression when using a link-function and an explicite transformation
of the dependent. Below some details.
I'm
2011 Aug 18
2
Concatenate two strings in one in a string matrix
Dear R-Users
I have the following matrix
> out$desc [,1] [,2]
[1,] "" ""
[2,] "y_{01}(k-001)" ""
[3,] "y_{01}(k-002)" ""
[4,] "y_{01}(k-003)" ""
[5,] "u_{01}(k-001)" ""
[6,] "u_{01}(k-002)" ""
[7,] "u_{01}(k-003)" ""
2000 Apr 04
0
stochastic process transition probabilities estimation
Hi all,
I'm new with R (and S), and relatively new to statistics (I'm a
computer scientist), so I ask sorry in advance if my question is silly.
My problem is this: I have a (sample of a) discrete time stochastic
process {X_t} and I want to estimate
Pr{ X_t | X_{t-l_1}, X_{t-l_2}, ..., X_{t-l_k} }
where l_1, l_2, ..., l_k are some fixed time lags. It will be enough for
me to compute
2008 May 23
0
Est. Component Size with AIC/BIC under Gamma Distribution
Dear all,
I am trying to model number of samples from
a given series. The series are modelled according
Gamma function.
In order to estimate the # samples, I use BIC/AIC
with MLE (computed from dgamma function).
Here is the code I have.
__BEGIN__
mlogl <- function( x_func, theta_func, samp) {
# computing log_likelihood
return( - sum(dgamma(samp, shape = x_func, scale=theta_func, log
2008 Apr 13
1
Installing R in Ubuntu
Hello, I am new to Ubuntu (Linux in general) and I am trying to install R: so far, I am stuck. I have followed the instructions at the CRAN website with little luck. I read an exchange about the same issue posted before, but did not give me enough information to solve things by myself, hence, this email. Based on the former exchange I read, I am trying to include enough information to see if
2001 May 30
3
Transformation of dissimilarity or distance matrix
Dear List,
is there an elegant (or even not elegant) way how to transform
dissimilarity or distance matrix A
(or, in general, arbitrary symmetrical matrix) by transposition of rows and
columns into a form
closest to "block diagonal" matrix B?
The matrix A is adjusted the following way
A[A<epsilon] <-0 #(epsilon is given "small" number)
B: (in its ideal form)
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all
I recently started to write a matrix exponentiation operator for R (by
adding a new operator definition to names.c, and adding the following code
to arrays.c). It is not finished yet, but I would like to solicit some
comments, as there are a few areas of R's internals that I am still feeling
my way around.
Firstly:
1) Would there be interest in adding a new operator %^% that performs