[R] mgcv::gam() scale parameter estimates for quasibinomial error models

2021-04-14 Thread John Maindonald
For both glm() and mgcv::gam() quasibinomial error models, the summary object has a dispersion value that has the same role as sigma^2 in the summary object for lm() model fits. Where some fitted probabilities are small, the `gam()` default scale parameter estimates, returned as `scale` (and `sig

Re: [R] graphics useRaster check_irregular definition for date or posix

2021-04-14 Thread Paul Murrell
Hi Feeding R-help back in, in case my suggestions might be of use to someone else ... Thanks for the examples - so the main benefit you are looking for is the labelling on the axes (date labels) ? If you are just trying to avoid the annoying white lines, it may just be your PNG/PDF viewer;

Re: [R] NLSR package newDeriv function

2021-04-14 Thread Debangan Dey
Hi Soren, Thanks for the reply. The main reason I want to compute the derivative is to add it to the derivative table in R so that I can use it later in my optimization. And, my complicated function doesn’t have an analytical form of the derivative as it involves distribution function of a biva

Re: [R] NLSR package newDeriv function

2021-04-14 Thread Søren Højsgaard
One approach is to compute things exact using the caracas package; see below. Best regards Søren > library(caracas) > f <- function(x,y){x+y} > def_sym(x,y,z) > f <- x+y^2+y*z^2 > f [caracas]: 2 2 x + y + y⋅z > > d1 <- der(f, c(x,y,z)) > d2 <- der2(f, c(x,y,z)) > >

Re: [R] different dimensions in W and my data in moran and spatial model

2021-04-14 Thread Bert Gunter
Almost certainly better posted on R-Sig-geo, not here. See here for more info on R mailing lists: https://www.r-project.org/mail.html Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Count

[R] different dimensions in W and my data in moran and spatial model

2021-04-14 Thread maria jesus herrerias
Hello everyone, I am writing my code in R to run the spatial models. I am learning this at the moment. I have my data for 116 countries over the period 1990-2014, and I got the shapefile from the website below. The objective is to get the matrix to run the spatial models. In th

[R] Documentation of Trigonometric Functions.

2021-04-14 Thread Jorgen Harmse via R-help
Is correct but incomplete documentation considered a bug? The documentation of trigonometric functions goes into detail about branch cuts for asin etc., but does not discuss the discontinuities of atan2. (It also fails to explain the difference between asin(2) (NaN) and asin(2+0i) (pi/2-acosh(2)

[R] NLSR package newDeriv function

2021-04-14 Thread Debangan Dey
Hi, I am trying to solve a non-linear least square which has a function from R^3 -> R. Is it possible to define gradient using newDeriv for a 3-variate scalar function? I am trying to use the genD function in numDeriv package to define numerical gradient and treat them as a function. So far, I

Re: [R] LHS random number generator

2021-04-14 Thread Rob C
Shah, I am the maintainer of the lhs package. Please feel free to contact package maintainers directly for help specific to their package. If I understood your request, this is how I would construct the lhs... prior_lhs <- data.frame( name = c("r_mu", "r_sd", "lmp", "gr_mu", "gr_sd", "alpha1"

Re: [R] Error loading "XLConnect" library

2021-04-14 Thread Bernard Comcast
Thanks Marc Bernard Sent from my iPhone so please excuse the spelling!" > On Apr 14, 2021, at 2:20 PM, Marc Schwartz wrote: > > Hi, > > When you experience errors with a third party package like that, one of the > first steps to take is to review the results of CRAN testing on the package.

Re: [R] Error loading "XLConnect" library

2021-04-14 Thread Marc Schwartz via R-help
Hi, When you experience errors with a third party package like that, one of the first steps to take is to review the results of CRAN testing on the package. That is available via the "CRAN checks:" link on the package page: https://cran.r-project.org/web/packages/XLConnect/index.html That

Re: [R] Error loading "XLConnect" library

2021-04-14 Thread Rui Barradas
Hello, That is a unix/linux command and you are on Windows. The cat command and other unix/linux commands can be installed when you install Rtools [1]. It is not well seen to cross post [2]. [1] https://cran.r-project.org/bin/windows/Rtools/ [2] https://stackoverflow.com/questions/67087299/e

Re: [R] How to force boundary conditions on discretized derivative in deSolve?

2021-04-14 Thread Bert Gunter
1. Your query is off topic. See the posting guide linked below for what is appropriate. In particular, note: "*Questions about statistics:* The R mailing lists are primarily intended for questions and discussion about the R software. However, questions about statistical methodology are sometimes po

[R] Error loading "XLConnect" library

2021-04-14 Thread Bernard McGarvey
I installed the "XLConnect" package which appears to be successful and then tried to load the "XLConnect" library and got an error as shown below. Any ideas as to where to look for the source of the error? The word "release" in the error message makes me think it is some issue with the version o

[R] How to force boundary conditions on discretized derivative in deSolve?

2021-04-14 Thread Brockway, Molly
Hello, I am using R package deSolve to solve a system of two differential equations for a one-dimensional spatial and time-based problem. There is one ODE and a second-order PDE. In order to solve with the function ode.1D, I've discretized the spatial derivative and put both equations in terms