Re: [R] MGCV:: boundary conditions in gam

2018-11-13 Thread Mark R Payne
fit,lty=2) > > lines(pd$x,ff$fit-2*ff$se.fit,lty=2) > > > On 08/11/2018 15:26, Mark R Payne wrote: > > Dear R-help, > > > > I have a problem where I am using the mgcv package to in a situation > where > > I am fitting a gam model with a

[R] MGCV:: boundary conditions in gam

2018-11-08 Thread Mark R Payne
Dear R-help, I have a problem where I am using the mgcv package to in a situation where I am fitting a gam model with a 1-D spline smoother model over a domain [a,b] but then need to make predictions and extrapolate beyond b. Is there anyway where I force the first derivative of the spline to be

[R] Problem with adding a raster and a brick

2018-05-24 Thread Mark R Payne
Hi, I seem to be having a problem adding the following two raster objects together - one is a rasterLayer, the other is a rasterBrick. The extent, resolution, and origin are the same, so according to my understand it should work. The objects look like so: > obs.clim class : RasterLayer

[R] Quantile regression with some parameters fixed across tau..

2018-02-23 Thread Mark R Payne
Hi, I would like to fit the following model with quantile regression: y ~ alpha + beta where both alpha and beta are factors. The conceptual model I have in my head is that alpha is a constant set of values, that should be independent of the quantile, tau and that all of the variability arises

Re: [R] Raster-package - problem with stackApply()

2015-12-11 Thread Mark R. Payne
Thanks for the reply Don - that's the problem in a nutshell - I'll repost on r-sig-geo Mark On 10/12/15 20:46, MacQueen, Don wrote: Appears to me that results for the third set of indices you supplied (1,1) ended up in the third layer of the result. Similarly for the other sets of

[R] Raster-package - problem with stackApply()

2015-12-10 Thread Mark R Payne
Hi, I am trying to use stackApply() to perform averages over subsets of a brick. However, I am struggling with the indices argument, and how it should be interpreted. Here is a simple working example illustrating my problem: r <- raster() r[] <- 1 inp <- brick(r,r,r,r,r,r)*(1:6) res <-