search for: statmode

Displaying 20 results from an estimated 69 matches for "statmode".

Did you mean: statmod
2011 May 26
1
Statistical mode
One descriptive statistic that is conspicuously missing from core R is the statistical mode - the most frequent value in a discrete distribution. I would like to propose adding the attached 'statmode' (or a similar function) to the 'stats' package. Currently, it can be quite cumbersome to calculate the mode of a distribution in R, both for experts and beginners. The lack of a function to do this is felt, both when teaching introductory R courses, and when using sapply() or the...
2011 Apr 28
1
Problems downloading statmod cran package
Hello all, I keep on getting the following error message when I try downloading statmod: > install.packages("statmod") Installing package(s) into ‘C:\Users\Isaac\Documents/R/win-library/2.12’ (as ‘lib’ is unspecified) trying URL ' http://www.revolution-computing.com/cran/bin/windows/contrib/2.12/statmod_1.4.9.zip ' Error in download.file(url, destfile, method, mode =
2019 Sep 29
2
depending on orphaned packages?
On 2019-09-25 3:26 a.m., Martin Maechler wrote: >>>>>> Ben Bolker >>>>>> on Tue, 24 Sep 2019 20:09:55 -0400 writes: > > > SuppDists is orphaned on CRAN (and has been since 2013). > > https://cran.r-project.org/web/checks/check_results_.html > > > Oddly, the simulate method for the inverse.gaussian family > >
2019 Sep 25
2
depending on orphaned packages?
SuppDists is orphaned on CRAN (and has been since 2013). https://cran.r-project.org/web/checks/check_results_.html Oddly, the simulate method for the inverse.gaussian family [inverse.gaussian()$simulate] depends (in a loose sense) on SuppDists (it fails if the SuppDists namespace is not available: if (!requireNamespace("SuppDists", quietly = TRUE)) stop("need CRAN
2019 Sep 29
1
depending on orphaned packages?
Ah, I spoke too soon. I started putting the demo code into a test suite and ran one check with valgrind and ? sure enough ? there's def more issues (a cpl functions) than the overt/easy ones (and, I went back to the check results page and, also sure enough, they're there, too). They look to be fairly straightforward to resolve but it's going to take a bit longer than "this
2009 Aug 07
1
Gauss-Laguerre using statmod
I believe this may be more related to analysis than it is to R, per se. Suppose I have the following function that I wish to integrate: ff <- function(x) pnorm((x - m)/sigma) * dnorm(x, observed, sigma) Then, given the parameters: mu <- 300 sigma <- 50 m <- 250 target <- 200 sigma_i <- 50 I can use the function integrate as: > integrate(ff, lower= -Inf, upper=target)
2019 Sep 29
0
depending on orphaned packages?
Or, a crazy person (me) cld volunteer to keep this running and get it back on CRAN. I fixed the severe warning and also added C-side registration code. The pkg is monolithic but the C code is super straightforward (a is the R code). Unless someone can think of a reason not to, I can submit this to CRAN this week and get the source up on social coding sites. It looks like Jerome Braun did this
2012 Jul 14
2
Help for Fisher's exact test
Hi, R-help, I have a group of data from RNA-seq want to be analyzed by Fisher's exact test in R. I want to compare the significant difference of about 30,0000 individuals in two different samples, and I have no idea how to use R, so could you please give me some suggestions or the scripts for Fisher's exact test? Thank you very much. Best, Guanfeng Wang [[alternative HTML version
2008 Sep 27
3
Double integration - Gauss Quadrature
Hi, I would like to solve a double integral of the form \int_0^1 \int_0^1 x*y dx dy using Gauss Quadrature. I know that I can use R's integrate function to calculate it: integrate(function(y) { sapply(y, function(y) { integrate(function(x) x*y, 0, 1)$value }) }, 0, 1) but I would like to use Gauss Quadrature to do it. I have written the following code (using R's statmod package)
2010 Apr 14
2
Gaussian Quadrature Numerical Integration In R
Hi All, I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral. Is there a way to do it in R? Is there a function already implemented which uses such weighting function. I have been searching in the statmode package and I found the function "gauss.quad(100, kind="hermite")" which uses the weighting function W(x)=exp(-x^2). Is there a more general version of this weighting function (using mu and sigma)? Thanks for your help Iazaiez
2010 Nov 14
1
Integrate to 1? (gauss.quad)
Does anyone see why my code does not integrate to 1? library(statmod) mu <- 0 s <- 1 Q <- 5 qq <- gauss.quad(Q, kind='hermite') sum((1/(s*sqrt(2*pi))) * exp(-((qq$nodes-mu)^2/(2*s^2))) * qq$weights) ### This does what's it is supposed to myNorm <- function(theta) (1/(s*sqrt(2*pi))) * exp(-((theta-mu)^2/(2*s^2))) integrate(myNorm, -Inf, Inf)
2003 Nov 11
2
sample size/power calc packages
For various reasons, I spent part of my time today looking at sample size and power calculation tools (don't ask, don't tell...). This seems to be one area that R is incredibly weak in (well, nearly all stat packages, except perhaps specialized tools and SAS); sure, there are a number of functions in various packages: base, statmod, Hmisc Have I missed something? (I
2010 Oct 04
1
Help with apply
Suppose I have the following data: tmp <- data.frame(var1 = sample(c(0:10), 3, replace = TRUE), var2 = sample(c(0:10), 3, replace = TRUE), var3 = sample(c(0:10), 3, replace = TRUE)) I can run the following double loop and yield what I want in the end (rr1) as: library(statmod) Q <- 2 b <- runif(3) qq <- gauss.quad.prob(Q, dist = 'normal', mu = 0, sigma=1) rr1 <- matrix(0,
2011 Jun 12
1
Score Test Function
Greeting R Community, I'm trying to learn Logistic Regression on my own and am using An Introduction to Logistic Regression Analysis and Reporting (Peng, C., Lee, K., & Ingersoll, G. ,2002). This article uses a Score Test Stat as a measure of overall fit for a logistic regression model. The author calculates this statistic using SAS. I am looking for an [R] function that can compute
2019 Sep 25
0
depending on orphaned packages?
>>>>> Ben Bolker >>>>> on Tue, 24 Sep 2019 20:09:55 -0400 writes: > SuppDists is orphaned on CRAN (and has been since 2013). > https://cran.r-project.org/web/checks/check_results_.html > Oddly, the simulate method for the inverse.gaussian family > [inverse.gaussian()$simulate] depends (in a loose sense) on SuppDists > (it
2005 May 20
2
address of Gordon Smyth ?
Anyone know where I can reach the author of the compareGrowthCurves function? I'm having trouble with it. Thanks, Suzie __________________________________________________________________ Switch to Netscape Internet Service. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at
2007 Mar 21
2
Gaussian Adaptive Quadrature
Hi all, Does anybody know any function that performs gaussian adapative quadrature integration of univariate functions? Thanks in advance, Regards, Caio __________________________________________________ [[alternative HTML version deleted]]
2008 May 30
3
loess plot
I was trying to plot some data in R. I used the following code to draw a loess fit and got the output as >?lines(lowess(log(abs(t(res))), log(abs(t(synthesised)))), col="red") Error in lowess(log(abs(t(res))), log(abs(t(synthesised)))) :?? NA/NaN/Inf in foreign function call (arg 1) Then I thought to use your Limma package for background correction. Do you think it's a right
2010 Sep 30
1
AIC for tweedie glm
Dear R-users, I'm trying to model some data using a tweedie GLM approach. My response variable is the number of pupae that are the offspring of a subordinate wasp on a wasp's nest. However, they're not count data- for each nest, I only know the mean number of pupae per subordinate, which is continous. The data also contain a high proportion of zeros. I'm not very experienced at
2008 Jan 21
1
Adding an Sweave Vignette to a package
I'm finalizing development of a package that will include a vignette. Without the vignette, the package builds fine with no warnings and is ready for distribution. Now, I am following the directions for developing vignettes "Sweave, Part II: Package Vignettes" by Friedrich Leisch. I am using a windows XP machine (other session info below). Here is what I have done. 1) I add the