Displaying 20 results from an estimated 400 matches similar to: "Matrix/Vector manipulation"
2012 Jul 18
4
The best solver for non-smooth functions?
# Hi all,
# consider the following code (please, run it:
# it's fully working and requires just few minutes
# to finish):
require(CreditMetrics)
require(clusterGeneration)
install.packages("Rdonlp2", repos= c("http://R-Forge.R-project.org",
getOption("repos")))
install.packages("Rsolnp2", repos= c("http://R-Forge.R-project.org",
2018 Apr 18
2
Event-triggered change in value with a time-delay
Hello,
I am solving a set of ODEs using deSolve and have run into a problem I
would appreciate some advice on. One of the parameters (m) in the ODEs
changes between two states when one of the variables (D) crosses a
threshold (D_T) for the first time in either direction. Additionally, when
the variable crosses the threshold (either by increasing or decreasing),
there is a time delay (delay)
2018 Apr 18
0
Event-triggered change in value with a time-delay
> On Apr 18, 2018, at 1:04 AM, Hannah Meredith <hrmeredith12 at gmail.com> wrote:
>
> Hello,
>
> I am solving a set of ODEs using deSolve and have run into a problem I
> would appreciate some advice on. One of the parameters (m) in the ODEs
> changes between two states when one of the variables (D) crosses a
> threshold (D_T) for the first time in either direction.
2017 Aug 26
2
Register Allocation and Scheduling Issues
Hello,
I have defined 8 registers in registerinfo.td file in the following order:
R_0, R_1, R_2, R_3, R_4, R_5, R_6, R_7
But the generated assembly code only uses 2 registers. How to enable it to
use all 8? Also can i control the ordering like after R_0 can i use R_5
without changes in registerinfo.td?
What changes are required here? either in scheduling or register allocation
phases?
2004 Nov 14
1
Combining expressions and objects within labels
Hello all,
I am an R novice and I have a simple question and hope somebody can help
me out.
I need to place several labels in a plot, this labels are some kind of
text and also some objects (which come from some more complicated R
calculations).
In one of this labels I'd like to place a superscript, however I cannot
find a way to place both the expression and the object in the same
2018 Mar 25
0
R-devel Digest, Vol 181, Issue 22
Thanks.
I am fully aware of what aggregate() returnes, and I can post-process this into the form I want ? if the names are available.
But for foo, the returned object is both different in structure and loses the name altogether:
foo <- function(x) { c(mean = base::mean(x)) }
str(aggregate(iris$Sepal.Length, by = list(iris$Species), FUN = foo))
## 'data.frame': 3 obs. of 2 variables:
2002 Feb 06
4
Weighted median
Is there a weighted median function out there similar to weighted.mean()
but for medians? If not, I'll try implement or port it myself.
The need for a weighted median came from the following optimization
problem:
x* = arg_x min (a|x| + sum_{k=1}^n |x - b_k|)
where
a : is a *positive* real scalar
x : is a real scalar
n : is an integer
b_k: are negative and positive scalars
2007 Jul 26
1
significance test for difference of two correlations
Dear R users,
how can I test, whether two correlations differ significantly. (I want to prove, that variables are correlated differently, depending on the group a person is in.)
Greetings from Freiburg im Breisgau (Germany),
Timo Stolz
2007 Nov 19
2
All nonnegative integer solution
Dear all,
Is there any method in R to find all possible nonnegative integer
solutions to the linear equation with unit coefficients as follow:
X1+X2+...+Xk=N
Thank you,
Amin Zollanvari
2017 Jun 25
0
AVX Scheduling and Parallelism
Hi, Zvi,
I agree. In the context of targeting the KNL, however, I'm a bit
concerned about the addressing, and specifically, the size of the
resulting encoding:
> vmovdqu32 zmm0, zmmword ptr [rax + c+401280] ;load b[401280] in
> zmm0
>
> vpaddd zmm1, zmm1, zmmword ptr [rax + b+401344]
> ; zmm1<-zmm1+b[401344]
The KNL can only
2017 Jun 25
2
AVX Scheduling and Parallelism
Hi Ahmed,
>From what can be seen in the code snippet you provided, the reuse of XMM0 and XMM1 across loop-unroll instances does not inhibit instruction-level parallelism.
Modern X86 processors use register renaming that can eliminate the dependencies in the instruction stream. In the example you provided, the processor should be able to identify the 2-vloads + vadd + vstore sequences as
2011 Jul 03
3
Hint improve my code
Hi
I have developed the code below. I am worried that the parameters I want to
be estimated are "not being found" when I ran my code. Is there a way I can
code them so that R recognize that they should be estimated.
This is the error I am getting.
> out1=optim(llik,par=start.par)
Error in pnorm(au_j, mean = b_j * R_m, sd = sigma_j) :
object 'au_j' not found
#Yet
2011 Jul 01
2
Help fix last line of my optimization code
Hi
I need help figure out how to fix my code.
When I call into R
>optimize(llik,init.params=F)
I get this error message
####Error in optimize(llik, init.params = F) : element 1 is empty;
the part of the args list of 'min' being evaluated was:
(interval)####
My data and my code looks like below.
R_j R_m
0.002 0.026567296
0.01 0.003194435
. .
. .
. .
. .
0.0006
2011 Jul 04
3
loop in optim
Hi
May you help me correct my loop function.
I want optim to estimates al_j; au_j; sigma_j; b_j by looking at 0 to 20,
21 to 40, 41 to 60 data points.
The final result should have 4 columns of each of the estimates AND 4 rows
of each of 0 to 20, 21 to 40, 41 to 60.
###MY code is
n=20
runs=4
out=matrix(0,nrow=runs)
llik = function(x)
{
al_j=x[1]; au_j=x[2]; sigma_j=x[3]; b_j=x[4]
2011 Jul 23
1
Extend my code to run several data at once.
Hi
I have a code that calculate maximisation using optimx and it is working
just fine. I want to extend the code to run several colomns of R_j where j
runs from 1 to 200. If I am to run the code in its current state, it means I
will have to run it 200 times manually. May you help me adjust it to
accomodate several rows of R_j and print the 200 results.
***Please do not get intimidated by the
2011 Jul 06
1
Group Data indexed by n Variables
Hello,
the more general thing I'd like to learn here is how to compute Function of
Data on the basis of grouping determiend by n variables.
In terms of the reason why I am interested in this, I need to compute the
average of my data based on the value of the month and day across years. I
have come up withy the code below which, as far as I can see, does what I
need but getting either a more
2006 Apr 25
5
Heteroskedasticity in Tobit models
Hello,
I've had no luck finding an R package that has the ability to estimate a
Tobit model allowing for heteroskedasticity (multiplicative, for example).
Am I missing something in survReg? Is there another package that I'm
unaware of? Is there an add-on package that will test for
heteroskedasticity?
Thanks for your help.
Cheers,
Alan Spearot
--
Alan Spearot
Department of Economics
2008 Jan 25
1
Poisson Maximum Likelihood Estimation
Hi
I am trying to carry out some maximum likelihood estimation and I'm not
making much headway, and I'm hoping that someone will be able to point me in
the right direction.
I am modelling mortality statistics. One way to do this is to model the
mortality rate (or, more accurately, log of the mortality rate, log_m) as
(say) a constant plus a proportion of age, plus time, so:
r_1 <-
2015 Jan 03
4
Potential cross-platform package building issue
I am using 32-bit R 3.1.2 on Windows 7.
I recently conducted an `R CMD check --as-cran` on a recently-developed
package and received only the 'New submission' note. Research on
StackOverflow and on R-devel suggested this could be ignored. I also used
devtools::build_win() and received no notes or warnings, other than the one
mentioned previously. Lastly, I conducted an `R CMD check` with
2017 May 10
4
strange system outage
I have a CentOS 7 system that I run a home grown python daemon on. I
run this same daemon on many other systems without any incident. On
this one system the daemon seems to die or be killed every day around
3:30am. There is nothing it its log or any system logs that tell me
why it dies. However in /var/log/messages every day I see something
like this:
May 10 03:35:58 localhost pure-ftpd: (tool at