search for: statmod

Displaying 20 results from an estimated 69 matches for "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, mo...
2019 Sep 29
2
depending on orphaned packages?
...if the SuppDists namespace is not available: > > > if (!requireNamespace("SuppDists", quietly = TRUE)) > > stop("need CRAN package 'SuppDists' for simulation from the > > 'inverse.gaussian' family") > > > > The statmod package also implements inverse gaussian d/p/q/r functions > > <https://journal.r-project.org/archive/2016-1/giner-smyth.pdf>. It is > > lightweight (depends on R >= 3.0.0, imports only base packages [stats > > and graphics]) and has been around for a long ti...
2019 Sep 25
2
depending on orphaned packages?
...)$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 package 'SuppDists' for simulation from the 'inverse.gaussian' family") The statmod package also implements inverse gaussian d/p/q/r functions <https://journal.r-project.org/archive/2016-1/giner-smyth.pdf>. It is lightweight (depends on R >= 3.0.0, imports only base packages [stats and graphics]) and has been around for a long time (archived versions on CRAN go back to 2...
2019 Sep 29
1
depending on orphaned packages?
...vailable: >>> >>>> if (!requireNamespace("SuppDists", quietly = TRUE)) >>>> stop("need CRAN package 'SuppDists' for simulation from the >>>> 'inverse.gaussian' family") >>> >>> >>>> The statmod package also implements inverse gaussian d/p/q/r functions >>>> <https://journal.r-project.org/archive/2016-1/giner-smyth.pdf>. It is >>>> lightweight (depends on R >= 3.0.0, imports only base packages [stats >>>> and graphics]) and has been around for...
2009 Aug 07
1
Gauss-Laguerre using statmod
...with absolute error < 4.4e-05 I would like to also use Gauss-Laguerre methods to also integrate this function. In doing so, I believe the only change of variable needed when integrating from -Inf to target is x = target - y_i where y_i is node i. As such, I can implement the following: library(statmod) falsePos <- function(target, m, mu, sigma, sigma_i, Q = 30){ gq <- gauss.quad(Q, kind="laguerre") nodes <- gq$nodes whts <- gq$weights y <- pnorm((target - nodes - m)/sigma_i) * dnorm(target - nodes, mu, sigma) sum(y * exp(nodes)* whts) } > falsePos(ta...
2019 Sep 29
0
depending on orphaned packages?
...SuppDists namespace is not available: >> >>> if (!requireNamespace("SuppDists", quietly = TRUE)) >>> stop("need CRAN package 'SuppDists' for simulation from the >>> 'inverse.gaussian' family") >> >> >>> The statmod package also implements inverse gaussian d/p/q/r functions >>> <https://journal.r-project.org/archive/2016-1/giner-smyth.pdf>. It is >>> lightweight (depends on R >= 3.0.0, imports only base packages [stats >>> and graphics]) and has been around for a long time...
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
...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) which works fine for one integral but it doesn't work for a double one: # Gauss-Legendre abscissas nodes <- gauss.quad.prob(25,dist="uniform",l=-1,u=1)$nodes # and weights weights <- gauss.quad.prob(25,dist="uniform",l=-1,u=1)$weights weights <- weights*2...
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...
2003 Nov 11
2
sample size/power calc packages
...oday 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 would've expected at least one sequential computation, or non-standard design, but apparently there are none, or I missed it). I'd appreciate hearing about work that I've missed... best, -tony -- rossini at u.washington.edu http://ww...
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, nrow = Q, ncol = nrow(tmp)) L <- nrow(tmp) for(j in 1:Q){ for(i in 1:L){...
2011 Jun 12
1
Score Test Function
...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 this stat and a p=value (please don't critique the stat itself). As far as I can tell glm.scoretest() from library(statmod) is the only function for this but it does not give a pvalue and appears to not correspond with the author's example. Some chat on the discussion board a while back indicated that this was a well known test Click here for that thread but difficult to calculate in [R]. I'm wondering if the...
2019 Sep 25
0
depending on orphaned packages?
...se) on SuppDists > (it fails if the SuppDists namespace is not available: > if (!requireNamespace("SuppDists", quietly = TRUE)) > stop("need CRAN package 'SuppDists' for simulation from the > 'inverse.gaussian' family") > The statmod package also implements inverse gaussian d/p/q/r functions > <https://journal.r-project.org/archive/2016-1/giner-smyth.pdf>. It is > lightweight (depends on R >= 3.0.0, imports only base packages [stats > and graphics]) and has been around for a long time (archived ve...
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
...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 choice ? However, I installed Limma using > source("http://www.bioconductor.org/biocLite.R") > biocLite("limma") > biocLite("statmod") > library(limma) and then used the commands which generated the error as follows -- > system.time(fit <- loessFit( log(abs(t(res))), log(abs(t(synthesised))))) Error in loessFit(log(abs(t(res))), log(abs(t(synthesised)))) : ? binary operation on non-conformable arrays Timing stop...
2010 Sep 30
1
AIC for tweedie glm
...o evaluate the fit of the model. I am used to using AIC to compare models. A site search turned up AICtweedie, within the tweedie package, but I get the following message: Error: could not find function "AICtweedie" when I try to use this command, even though "tweedie" and "statmod" are both loaded. I've also read that AIC can be calculated using dtweedie, but I'm a beginner and so, despite lots of searching, I'm not sure how. I'm sorry to ask a basic statistics rather than programming question, but I'm really stuck. Could anyone advise me on the best...
2008 Jan 21
1
Adding an Sweave Vignette to a package
...fo below). Here is what I have done. 1) I add the 'inst/doc' directory to the package source tree. 2) I have added the following information in the preamble of the .Rnw file % \VignetteIndexEntry{An \texttt{R} Package for Miscellaneous Psychometric Analyses} % \VignetteDepends{MiscPsycho, statmod} % \VignetteKeyword{misc} 3) I then copy the file "MP.Rnw" to the 'inst/doc' directory. 4) I then run Rcmd build g:\MiscPsycho The process begins as usual and it even tries to create the vignette. However, it runs into an error at code chunk 1 complaining that it cannot find the...