similar to: statistical mode function

Displaying 20 results from an estimated 1000 matches similar to: "statistical mode function"

2001 Aug 07
2
image() colors
Hi, everybody! I am currently dealing with spatial estimation and thus writing some smoothing algorithms. My question concerns the graphical output. I would like my function to produce a picture of input data (X) and of estimation results(Y). Both, X and Y are categorical variables which can take values 1,2,...,Cl. So, basically I write foo<-function(){ ....
2008 Oct 06
2
ignore error in for-loop
Hi all, Can anybody tell me what to do in case an error occurs inside a for-loop and I don't want the program to exit the loop? Rather instead I would like it to just go to the next number in the loop and try again with the new number. Is there any function like "on error go back to" or "skip error" ... ? Thanks in advance, Erich Erich STRIESSNIG IIASA
2001 Jul 16
0
partitioning a space
Hello, everybody! I have subscribed to the list only recently, although I've been actively using R since February. I found it very useful and very flexible and I hope to learn to use it better. My current problem concerns spatial statistics. I need to partition a regular rectangular grid into given number of subsets. For example for a 5*5 grid with 3 subsets I could have: 1 1 1 2 2 1 1 2
2001 Oct 23
1
loading packages
Thanks to Roger for pointing out the packages spweights and sptests to me. I believe they will be quiet useful in my work. But... I can't get them to work! Firstly, I realised that a newer version of R is available. I have now downloaded and installed it. When I try to 'install packages from CRAN' I get: trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES' unable
2001 Oct 22
1
statistics for ragged arrays: loop to vector
Dear R users, I am currently writing a MCMC algorithm for spatial Poisson model. One problem which I need to solve is as follows: I have a vector X[1:J] which describes characteristics of cells of a rectangular grid. Further, for each cell I have a list of adjascent cells adj[] and the vector listing numbed of adjascent cells num[]. Thus if I want to list cells adjascent to cell i I write
2009 Aug 17
0
weighting nlme in multivariate outcome
Dear R-nlme expert We need two pieces of information about the fitting of a nlme model which we cannot extract from the R help files and would be most grateful if you could help us. We fit an energy allocation growth model with 4 parameters to individual growth curves using the nlme routine. We thus have repeated age and size measurements of individuals and therefore allow for random
2011 Jul 30
3
ifelse returns
Greetings R Community, I am working with the ifelse function and it is returning something unexpected. In the code the line with the MODE1 assignment the output is a vector [1] 4 5 6 but when I put the MODE1 object into the ifelse function [R}'s output for MODE1 is the first number from the string (4). Why is this? Given the supplied vector of x I would assume both the MODE1 and ifelse()
2003 Jun 23
2
Summary for mode of a data set
Dear R People: thank you for the many helpful sets of code that I received!!! I combined several of the concepts for the following function: > mode1 function(x) { y <- rle(sort(x)) z <- y$values[y$lengths==max(y$lengths)] return(z) } > xm [1] 22 15 10 30 25 26 2 17 28 2 24 6 26 24 5 22 20 14 > mode1(xm) [1] 2 22 24 26 > This will pick
2006 Oct 21
2
problem with mode of marginal distriubtion of rdirichlet{gtools}
Hi all, I have a problem using rdirichlet{gtools}. For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ ( \sum_{i}a_i - n)$; The means are $a_i / (\sum_{i} a_i ) $; I tried to study the above properties using rdirichlet from gtools. The code are: ############## library(gtools) alpha = c(1,3,9) #totoal=13 mean.expect = c(1/13, 3/13, 9/13) mode.expect = c(0, 2/10, 8/10) #
2012 Dec 18
1
multi dimensional optim problem
I am attempting to use optim to solve a neural network problem. I would like to optimize coefficients that are currently stored in a matrix Y=270 x 1 X= 27- x 14 b1= 10x14 b2= 11x1 V= 10 x 14 set of prior variances. I have the following function: posterior.mode1=function(y,X,b_0,b2,V) { log.like=function(b1) { a_g=compute(b1) z_g=tanh(a_g); z_g=cbind(1,z_g)
2011 Aug 04
1
How to get the test statistic corresponding to the p-value in mtable?
Dear R-Users, I want to use mtable from package "memisc" to produce Latex-style estimation output. However, mtable() only gives me a p-value and not the corresponding test-statistic. Does anyone know how to extract it, either from a glm/anova object or mtable? Here is a short example: # Run this #################### install.packages("memisc") library(memisc) set.seed(1)
2016 Feb 26
2
how to force llvm generate gather intrinsic
If I'm understanding correctly, you're saying that vgather* is slow on all of Excavator, Haswell, Broadwell, and Skylake (client). Therefore, we will not generate it for any of those machines. Even if that's true, we should not define "gatherIsSlow()" as "hasAVX2() && !hasAVX512()". It could break for some hypothetical future processor that manages to
2016 Feb 25
2
how to force llvm generate gather intrinsic
It seems that http://reviews.llvm.org/D15690 only implemented gather/scatter for AVX-512, but not for AVX/AVX2. Is there any plan to enable gather for AVX/2? Thanks. Best, Zhi On Thu, Feb 25, 2016 at 8:28 AM, Sanjay Patel <spatel at rotateright.com> wrote: > I don't think gather has been enabled for AVX2 as of r261875. > Masked load/store were enabled for AVX with: >
2016 Feb 25
2
how to force llvm generate gather intrinsic
Yes, masked load/store/gather/scatter are completed. - Elena From: zhi chen [mailto:zchenhn at gmail.com] Sent: Thursday, February 25, 2016 01:20 To: Demikhovsky, Elena <elena.demikhovsky at intel.com> Cc: Sanjay Patel <spatel at rotateright.com>; Nema, Ashutosh <Ashutosh.Nema at amd.com>; llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] how to
2016 Feb 26
0
how to force llvm generate gather intrinsic
That makes great sense. It would be great if we have profitability mode to see the necessity to use gathers. Or it also would be good if there is a compiler option for the users to enable LLVM to generate the gather instructions no matter it is faster or slow. Best, Zhi On Fri, Feb 26, 2016 at 12:49 PM, Sanjay Patel <spatel at rotateright.com> wrote: > If I'm understanding
2016 Feb 26
0
how to force llvm generate gather intrinsic
No. Gather operation is slow on AVX2 processors. - Elena From: zhi chen [mailto:zchenhn at gmail.com] Sent: Thursday, February 25, 2016 20:48 To: Sanjay Patel <spatel at rotateright.com> Cc: Demikhovsky, Elena <elena.demikhovsky at intel.com>; Nema, Ashutosh <Ashutosh.Nema at amd.com>; llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] how to force
2014 Oct 27
4
[LLVMdev] Adding masked vector load and store intrinsics
we just follow a common recommendation to start with intrinsics: http://llvm.org/docs/ExtendingLLVM.html - Elena From: Owen Anderson [mailto:resistor at mac.com] Sent: Sunday, October 26, 2014 23:57 To: Demikhovsky, Elena Cc: llvmdev at cs.uiuc.edu; dag at cray.com Subject: Re: [LLVMdev] Adding masked vector load and store intrinsics What is the motivation for using intrinsics
2014 Oct 28
2
[LLVMdev] Adding masked vector load and store intrinsics
Many oveloaded intrinsics may be replaced with instructions - fabs or fma or sqrt. Chandler will probably explain the criteria. What the diff between fma and fadd? Or fptrunc and fabs? A new instruction like %a = loadm <4 x i32>* %addr, <4 x i32> %passthru, i32 4, <4 x i1>%mask is possible, but may be not very useful for most of targets. So we start from intrinsics. -
2016 May 20
5
Working on FP SCEV Analysis
To the best of my experience, handling case B (secondary induction) is must-have, and if I’m not mistaken, people aren’t opposed to that. For me, handling case A (primary induction) is “why not?”, but I certainly admit that that can be very naïve thinking coming from lack of good understanding on SCEV and their proper usages. Now, let’s assume we can postpone discussion about case A. What is the
2016 Apr 12
2
X86 TRUNCATE cost for AVX & AVX2 mode
<Copied Cong> Thanks Elena. Mostly I was interested in why such a high cost 30 kept for TRUNCATE v16i32 to v16i8 in SSE41. Looking at the code it appears like TRUNCATE v16i32 to v16i8 in SSE41 is very expensive vs SSE2. I feel this number should be same/close to the cost mentioned for same operation in SSE2ConversionTbl. Below patch from Cong Hou reduce cost for same operation in SSE2