Re: [R-pkg-devel] WInbuilder and rHub updating
Hi Roy, R-hub installs everything on-demand, at build/check time, from CRAN, and possibly other sources. So as soon as the package is on CRAN, it is available on R-hub. One glitch is that, even though the package is already on CRAN, it might not have a binary build yet, and if it requires compilation, then R-hub might not be able to build it. Should this happen, please open an issue here: https://github.com/r-hub/rhub/issues R-hub also supports packages from other sources, this is useful for testing your package with non-CRAN dependencies. See this doc for details: https://cran.rstudio.com/web/packages/remotes/vignettes/dependencies.html Best, Gabor On Sun, May 19, 2019 at 7:09 PM Roy Mendelssohn - NOAA Federal via R-package-devel wrote: > > > > > -- Forwarded message -- > From: Roy Mendelssohn - NOAA Federal > To: Roy Mendelssohn - NOAA Federal via R-package-devel > > Cc: > Bcc: > Date: Sun, 19 May 2019 11:09:17 -0700 > Subject: WInbuilder and rHub updating > HI All: > > I have a package I am developing that depends on a package that was just > accepted and appears on CRAN. Do Winbuilder and rHub update daily, or if > not, what is the usual lag for new packages to appear on the test machines. > Or may generally, is there a way to query what packages are available on > either or both of these? That would be the biggest help. > > Thanks, > > -Roy > > > > ** > "The contents of this message do not reflect any position of the U.S. > Government or NOAA." > ** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > ***Note new street address*** > 110 McAllister Way > Santa Cruz, CA 95060 > Phone: (831)-420-3666 > Fax: (831) 420-3980 > e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ > > "Old age and treachery will overcome youth and skill." > "From those who have been given much, much will be expected" > "the arc of the moral universe is long, but it bends toward justice" -MLK Jr. > > > > > -- Forwarded message -- > From: Roy Mendelssohn - NOAA Federal via R-package-devel > > To: Roy Mendelssohn - NOAA Federal via R-package-devel > > Cc: > Bcc: > Date: Sun, 19 May 2019 11:09:17 -0700 > Subject: [R-pkg-devel] WInbuilder and rHub updating > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] How to obtain intercept of intercept-only glm in Fortran?
Negative binomial is a bit trickier since it's a two parameter family without a closed-form MLE. For the probability parameter, you can use the closed form MLE at https://en.wikipedia.org/wiki/Negative_binomial_distribution#Maximum_likelihood_estimation For the number of samples, you'll need to use an iterative method to solve the score equation (see the above link). It's probably easier to code this up yourself rather than calling into R, but if you do call into R, I'd look into using the `fitdistr` function instead of a full regression method, as demonstrated at https://stat.ethz.ch/pipermail/r-help/2012-October/338458.html Michael On Sat, May 11, 2019 at 11:10 AM Wang, Zhu wrote: > > Thanks Michael. > > I also need an intercept-only negative binomial model with unknown scale > parameter. So my thought was on borrowing some codes that already existed. I > think Ivan's solution is an excellent one and can be extended to other > scenarios. > > Best, > > Zhu > > On May 11, 2019, at 9:48 AM, Michael Weylandt > wrote: > > On Sat, May 11, 2019 at 8:28 AM Wang, Zhu wrote: >> >> >> I am open to whatever suggestions but I am not aware a simple closed-form >> solution for my original question. >> > > It would help if you could clarify your original question a bit more, but for > at least the main three GLMs, there are closed form solutions, based on means > of y. Assuming canonical links, > > - Gaussian: intercept = mean(y) > - Logistic: intercept = logit(mean(y)) [Note that you have problems here if > your data is all 0 or all 1] > - Poisson: intercept = log(mean(y)) [You have problems here if your data is > all 0] > > (Check my math on these, but I'm pretty sure this is right.) > > Like I said above, this gets trickier if you add observation weights or > offsets, but the same ideas work. > > Stepping back to the statistical theory: GLMs predict the mean of y, > conditional on x. If x doesn't vary (intercept only model), then the GLM is > just predicting the mean of y and the MLE for the mean of y is exactly that > under standard GLM assumptions - the sample mean of y. > > We then just have to use the link function and its inverse to transform to > and from the observation space (where mean(y) lives) and the linear predictor > space (where the intercept term naturally lives). > > Michael __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel