similar to: Uniroot - error

Displaying 20 results from an estimated 110 matches similar to: "Uniroot - error"

2008 Jan 29
1
for loop help
Hi, I have written the following code which works fine step<-5 numSim<-15 N<-double(numSim) A<-double(numSim) F<-double(numSim) M<-double(numSim) genx<-double(numSim) for (i in 1:numSim) { N[i]<-20 PN<-(runif(N[i], 0, 1)) A[i]<-sum(ifelse(PN>0.2, 1, 0)) PF<- runif((A[i]*0.5), 0, 1) F[i]<-sum(ifelse(PF>0.2, 1, 0)) PM<-
2011 Feb 28
1
Transforming list into an array
Hello. I have the following object which is a list of length NumSim with each entry being a matrix of dimensions Ncurvas x 3: dW = replicate(NumSim,cbind(rnorm(Ncurvas),rnorm(Ncurvas),rnorm(Ncurvas)),simplify=F) I would like to transform it into an array of dimension Ncurvas x 3 x NumSim. Does anybody does how to do this? or how to generate directly and array composed of independent random
2011 Nov 23
2
avoiding the sample in built function
Dear all, I am currently working on a function in which I would like to avoid using the command sample(). Therefore, I am now trying to make a for loop that does the same thing as the in built function sample does: Rearranging the items of a object randomly. So, the output I want to you get is the same as sample() would give me: e.g.: data <- c(5,4,6,7,8) sample(data) > data <-
2011 Nov 16
0
Maximum likelihood for censored geometric distribution
Hi all, I need to check for a difference between treatment groups in the parameter of the geometric distribution, but with a cut-off (i.e. right censored). In my experiment I stimulated animals to see whether I got a response, and stopped stimulating if the animal responded OR if I had stimulated 10 times. Since the response could only be to a stimulation, the distribution of response times
2013 Apr 01
1
lognormal sampleing using covariance matrix
Dear All,   wondering if someine can access the link to the randsamp code referenced in the R-help archive here: http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg75645.html ? I have tried but for whatever reason I can not get trough. My problem seems to be similar to what the author originally described there, so having access to it would be great. Else, if you have any thougths on sampling
2010 Aug 18
5
ifelse command
hello people, I want to make a biased dice using the sample() function and print out the results after n number of runs, I've successfully generated the dice using the following command: mydie2<-function(n=1000,y=NULL,...){ for(i in 1:n){ x<-sample(1:6,n,replace=TRUE,prob=c(1,1,2,3,2,1)/10) x=runif(n) if(x<=1/10){y[i]=1} else if(x<=2/10){y[i]=2} else if(x<=4/10){y[i]=3} else
2014 Oct 14
1
low frequency content
Hello, We are trying to figure out how to preserve the low-frequency content when we try to convert a .wav file to an .opus file. What settings in Opus that can accomplish this? Sincerely, Vinson Go cid:image001.png at 01C94EE1.4DA09EF0 TBSI - SIMPLICITY in Neuro-Solutions <http://www.tbsi.biz/> Tethered and Wireless Solutions for Neural Recording and Stimulation Vinson
2007 Nov 06
1
Problem with a non-factor, non-numeric variable in a data.frame
Dear R list, I would like to perform an ANOVA in a set of measurements, but I have problems formatting the data. The data is a two dimensional array containing two columns: - "Stim" : the type of stimulation (string) - "Ratio" : a ratio of two numeric values Now, because some values are missing in the data (defaulting to zero), part of this array will be populated with NA
2003 Jun 11
1
COX PH models for event histories?
This is a question about the use of the Cox proportional hazards model to analyze event histories. I am looking at the responses of sympathetic nervous system activity to a stimulus. The activity I observe is a burst that can only occur once per heart beat cycle (e.g., a binary count). Typically bursts occur in 60-80% of the heart cycles * sensory stimuli can modify these burst probabilities.
2004 Aug 06
0
install doc v0.00001
I'll add our init script for redhat to it then: note: it does work, but restarting is not always working, due to ports still being open :-( --------------------------------------------------------------------- #!/bin/sh # # description: starts/stops the ices audioencoder # # chkconfig: 345 99 20 # # Source function library. . /etc/rc.d/init.d/functions
2004 Aug 06
1
install doc v0.00001
hey all, maybe i am dumb but it took me a few hours to work out which cvs was which and where ogg went etc etc...so i am completing some documentation (the icantcode site was down too when i checked last time, is it still alive?) anyway, I am going to make some good documentation for my site soon but heres a skeleton including some snippets from docs online already - appologies in advance for
2010 Jul 14
1
Running yum shows errors
Hi I am getting the following errors when i try to use yum to install the net-snmp paclages. [root at sc1 yum.repos.d]# yum install net-snmp Loaded plugins: fastestmirror Determining fastest mirrors Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 229,
2004 Aug 06
3
Icecast2 documentation
I use the cvs version: cvs -d :pserver:anonymous@cvs.icecast.org:/cvsroot login cvs -d :pserver:anonymous@cvs.icecast.org:/cvsroot checkout ice2 cd ice2 cvs -d :pserver:anonymous@cvs.icecast.org:/cvsroot checkout avl cvs -d :pserver:anonymous@cvs.icecast.org:/cvsroot checkout log cvs -d :pserver:anonymous@cvs.icecast.org:/cvsroot checkout httpp cvs -d :pserver:anonymous@cvs.icecast.org:/cvsroot
2005 Jun 30
0
vecortizing uniroot() for numerical solutions
# Hi All, # # I need to solve a somewhat complex equation at many parameter values for # a number of different parameters. # A simplified version of the equation is: 0= (d1/(h1^2))-(h2*(d2^2)) # I'd like to solve it across a parameter space of d1 and d2, holding # h1 and h2 constant. # It seems that uniroot() can do it, but I don't see how to vectorize it. #
2011 Apr 27
1
applying uniroot function to each element in vector
If I have a vector of n elements, e.g. a vector of length 4 with elements 10, 20, 30, 40 and want to find the different values of x such that x^2=10, x^2=20, x^30 and x^2=40, how could I do this in R? I'm thinking of using the uniroot function, but am finding difficult applying it to a vector. Thanks -- View this message in context:
2006 Jul 30
0
re 11. uniroot and function opposite signs warning
Nurza, Try running a while loop steping out until you have a start and finish thats the function is opposite in sign. You need a "start" and "finish" where F is + and - on either side of the loop. Graphing F might help. step<-10 checkme<-F(start)*F(finish+step) while(checkme>0){ initialstep<-initialstep*2 checkme<-F(start)*F(finish+step) }
2000 Feb 24
1
fisher.test() in ctest or perhaps uniroot() (PR#455)
fisher.test(matrix(c(1,20,246,6873),2),hybrid=F) Error in if (f(lower, ...) * f(upper, ...) >= 0) stop("f() values at end points not of opposite sign") : missing value where logical needed Thomas Lumley Assistant Professor, Biostatistics University of Washington, Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list --
2006 Apr 05
0
uniroot warning (lack of) (PR#8750)
Full_Name: Chris Andrews Version: 2.2.1 OS: Windows Submission from: (NULL) (128.205.94.95) The function page for uniroot indicates If the algorithm does not converge in 'maxiter' steps, a warning is printed and the current approximation is returned. I have not been able to get a warning message even when I think I should get one (see code below). Perhaps the bug is in the
2006 Oct 27
1
making uniroot a bit more robust?
Hi, I wonder if it would make sense to make uniroot detect zeros at the endpoints, eg if f(lower)==0, return lower as the root, else if f(upper)==0, return upper as the root, else stop if f(upper)*f(lower) > 0 (currently it stops if >=), else proceed to the algorithm proper. Currently I am using a wrapper function to implement this, and I found it useful. But I didn't want to send a
2008 Dec 31
1
uniroot() problem
I have a strange problem with uniroot() function. Here is the result : > uniroot(th, c(-20, 20)) $root [1] 4.216521e-05 $f.root [1] 16.66423 $iter [1] 27 $estim.prec [1] 6.103516e-05 Pls forgive for not reproducing whole code, here my question is how "f.root" can be 16.66423? As it is finding root of a function, it must be near Zero. Am I missing something? -- View this message