similar to: Referring to matrix elements by name, iteratively

Displaying 20 results from an estimated 500 matches similar to: "Referring to matrix elements by name, iteratively"

2019 May 06
2
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
Optim's Nelder-Mead works correctly for this example. > optim(par=10, fn=fn, method="Nelder-Mead") x=10, ret=100.02 (memory) x=11, ret=121 (calculate) x=9, ret=81 (calculate) x=8, ret=64 (calculate) x=6, ret=36 (calculate) x=4, ret=16 (calculate) x=0, ret=0 (calculate) x=-4, ret=16 (calculate) x=-4, ret=16 (memory) x=2, ret=4 (calculate) x=-2, ret=4 (calculate) x=1, ret=1
2009 Jun 25
2
stringsAsFactors has no impact in expand.grid()?
Hi I have the feeling, that the argument stringsAsFactors has no impact in the function expand.grid: a <- c("PR", "NC", "A2", "BS") b <- c(1, 0.5, 0.25, 0.125, 0.0625, 0.03125) class(expand.grid(css, fscs, stringsAsFactors=FALSE)[[1]]) [1] "factor" class(expand.grid(css, fscs, stringsAsFactors=TRUE)[[1]]) [1] "factor" Also, when
2019 May 03
2
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
Yes, I think you are right. I was at first confused by the fact that after the optim() call, > environment(fn)$xx [1] 10 > environment(fn)$ret [1] 100.02 so not 9.999, but this could come from x being assigned the final value without calling fn. -pd > On 3 May 2019, at 11:58 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > Your results below make it look like a
2010 Aug 10
1
one (small) sample wilcox.test confidence intervals
Dear R people, I notice that the confidence intervals of a very small sample (e.g. n=6) derived from the one-sample wilcox.test are just the maximum and minimum values of the sample. This only occurs when the required confidence level is higher than 0.93. Example: > sample <- c(1.22, 0.89, 1.14, 0.98, 1.37, 1.06) > summary(sample) Min. 1st Qu. Median Mean 3rd Qu. Max.
2019 May 06
0
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
That's consistent/not surprising if the problem lies in the numerical gradient calculation step ... On 2019-05-06 10:06 a.m., Ravi Varadhan wrote: > Optim's Nelder-Mead works correctly for this example. > > >> optim(par=10, fn=fn, method="Nelder-Mead") > x=10, ret=100.02 (memory) > x=11, ret=121 (calculate) > x=9, ret=81 (calculate) > x=8, ret=64
2019 May 06
1
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
It seems that it's an old bug that was found in some other packages, but at that time not optim: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15958 and that Duncan Murdoch posted a patch already last Friday :) Thomas Am 06.05.2019 um 16:40 schrieb Ben Bolker: > That's consistent/not surprising if the problem lies in the numerical > gradient calculation step ... >
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
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]
2005 Dec 10
2
quantile regression problem
Dear List members, I would like to ask for advise on quantile regression in R. I am trying to perform an analysis of a relationship between species abundance and its habitat requirements - the habitat requirements are, however, codes - 0,1,2,3... where 0<1<2<3 and the scale is linear - so I would be happy to treat them as continuos The analysis of the data somehow does not work, I am
2013 Sep 16
2
Zigor Ebro 650 compatibility - revisited (on Windows, at least)
Hi Arnaud and NUT team You may recall some time ago, I and a few others posted questions about the above referenced (cheap and cheerful) USB-based UPS - specifically regarding FreeBSD USB support in NUT. The original posting was entitled "Zigor Ebro 650 compatibility". I've since tried the latest Windows port of NUT with my WinXP laptop connected to the Zigor Ebro and finally
2004 Oct 15
1
power in a specific frequency band
Dear R users I have a really simple question (hoping for a really simple answer :-): Having estimated the spectral density of a time series "x" (heart rate data) with: x.pgram <- spectrum(x,method="pgram") I would like to compute the power in a specific energy band. Assuming that frequency(x)=4 (Hz), and that I am interested in the band between f1 and f2, is the
2010 Aug 03
4
mixing strings and numeric doubles in an array
I have an array called "stocks" which contains numeric dates, ticker symbols,prices, etc. > stocks[1:3,] DATE TICKER PERMNO EXCHCD TSYMBOL TRDSTAT SHROUT PRC RET 1 19950131 EWST 10001 3 EWST A 2224 -7.75000 -0.031250 2 19950228 EWST 10001 3 EWST A 2224 7.54688 -0.026210 3 19950331 EWST
2015 Oct 15
2
potencia fracional de un número negativo
No sé si he entendido bien la pregunta, pero creo que lo que quieres obtener es esto: (as.complex(-0.5)^(1/5)) Saludos,Salva > To: r-help-es en r-project.org > From: canadasreche en gmail.com > Date: Thu, 15 Oct 2015 10:45:10 +0200 > Subject: Re: [R-es] potencia fracional de un número negativo > > Hola. > No sé si va por aquí, pero prueba a quitar el paréntesis a (-0.5) >
2011 Jun 08
2
Misconfiguration of Windows MSI installer 2.6.0-1 with my Powerware 5115 connected via USB port
Hello. I've tried to configure Windows (complete port, Beta): Windows MSI installer 2.6.0-1 with my Powerware 5115 connected via USB port but have no luck. Here is my config files: *nut.conf:* MODE = netserver *ups.conf:* [PW5115] driver = bcmxcp_usb port = notUsed desc = "PowerWare 5115" *upsd.conf:* LISTEN 192.168.1.12 3493 *upsd.users:* [monuser]
2005 May 04
1
Calculate median from counts and values
I am tangled with a syntax question. I want to calculate basic statistics for a large dataset provided in weights and values and I can't figure out an elegant way to expand the data. For example here are the counts: > counts n4 n3 n2 n1 p0 p1 p2 p3 p4 1 0 0 0 1 1 3 16 55 24 2 0 0 0 0 2 8 28 47 15 3 1 17 17 13 4 5 12 24 8 ... and the values: > values
2013 Feb 21
2
ggplot2, geomtile fill assignment
Dear R help, I have some readings in three dimensions (x, y, z) and an amplitude for each. I'd like to visualize the data using ggplot, using tile plots, as I have some additional point data I would like to eventually overlay on the tile plots. I would like to subset the data by sections, slices if you will, in the z dimension, and plot the data for that slice. I can do all of this, but am
2011 Jan 20
1
Problems with ecodist
Dear Dr.Goslee and anyone may intrested in matrix manipulate, I am using your ecodist to do mantel and partial mantel test, I have locality data and shape variation data, and the two distance matrixs are given as belowings. When I run the analysis, it is always report that the matrix is not square, but I didn't know what's wrong with my data. Would you please help me on this. I am quite
2003 Dec 07
5
RxFAX application
Hi all, I have installed FAX app as described in several mails. When a fax call is received, I get the following in the * console: -- Starting simple switch on 'Zap/1-1' -- Executing Answer("Zap/1-1", "") in new stack -- Executing Ringing("Zap/1-1", "") in new stack -- Executing Wait("Zap/1-1", "2") in new stack
2014 Feb 02
5
[LLVMdev] [RFC] BlockFrequency is the wrong metric; we need a new one
Right now, all profile information is funneled through two analysis passes prior to any part of the optimizer using it. First, we have BranchProbabilityInfo, which provides a simple interface to the simplest form of profile information: local and relative branch probabilities. These merely express the likelihood of taking one of a mutually exclusive set of exit paths from a basic block. They are
2006 Apr 05
1
hist function: freq=FALSE for standardised histograms
Dear All, I am a undergraduate using R for the first time. It seems like an excellent program and one that I look forward to using a lot over the next few years, but I have hit a very basic problem that I can't solve. I want to produce a standardised histogram, i.e. one where the area under the graph is equal to 1. I look at the manual for the histogram function and find this: freq: