similar to: Negative prediction by gam

Displaying 20 results from an estimated 7000 matches similar to: "Negative prediction by gam"

2008 Nov 14
1
negative prediction by gam (mgcv package)
Hi Gam in mgcv package is predicting negative values which should not be the case despite all the predictors and response variables are positive. Tried to use log link function but it did not help. Please help sunil -- View this message in context: http://www.nabble.com/negative-prediction-by-gam-%28mgcv-package%29-tp20494965p20494965.html Sent from the R help mailing list archive at
2005 Mar 14
0
fixed/ initialising trellis device {lattice}/ postscript
Thanks Andy out<- xyplot(....) print(out) did the trick nicely. Sam ---- Sam McClatchie, Biological oceanography South Australian Aquatic Sciences Centre PO Box 120, Henley Beach 5022 Adelaide, South Australia email <mcclatchie.sam at saugov.sa.gov.au> Telephone: (61-8) 8207 5448 FAX: (61-8) 8200 2481 Research home page <http://www.members.iinet.net.au/~s.mcclatchie/>
2005 Jan 06
0
Rprofile file to automatically plot data, tried using the .First command.
No. You put the _whole_ thing into .First(), not just the plot statement. One possibility is to have the code in a script file (say myscript.R) and define .First as follows: .First <- function() source("myscript.R") Haven't try it myself, though. Andy > From: John Fisler > > Dear Dr. Andreas Kiermeier and the R help Community, > > Thank you for your idea on
2006 May 19
4
Cross correlation/ bivariate/ mantel
> Background: > OS: Linux Ubuntu Dapper > release: R 2.3.0 > editor: GNU Emacs 21.4.1 > front-end: ESS 5.2.3 > ----------------------------- > Colleagues > I have two spatial datasets (latitude, longitude, fish eggs) and (latitude, longitude, fish larvae) at the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasets are spatially correlated. In other
2004 Aug 09
0
returns the value of a polynomial of degree n evaluated a t x.
Try something like: install.packages("polynom") library(polynom) predict(polynomial(rev(p)), x) HTH, Andy > From: McClatchie, Sam (PIRSA-SARDI) > > > Background: > > OS: Linux Mandrake 9.1 > > release: R 1.9.0 > > editor: Xemacs 21.4 > > frontend: ESS 5.1.23 > > --------------------------------- > > > > Colleagues > >
2005 Sep 14
0
R CMD INSTALL -l /path/to/library packagename/ fixed
Background: OS: Linux Mandrake 10.1 release: R 2.1.1 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues The environment variables checked with Sys.getenv() all appeared to be in the right place. The easy fix was to copy /usr/lib/R into /usr/local/lib/R then run the R CMD INSTALL packagename then just copy the package subdirectory back to
2005 Jul 28
2
lattice/ grid.layout/ multiple graphs per page
Background: OS: Linux Mandrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues I have a set of lattice plots, and want to plot 4 of them on the page. I am having trouble with the layout. grid.newpage() pushViewport(viewport(layout = grid.layout(2,2))) pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 1)) working trellis
2005 Oct 18
2
Lattice graphics strip labels for shingles
Dear all, back in 2002 Martin Henry H. Stevens wrote (https://stat.ethz.ch/pipermail/r-help/2002-May/019851.html) > How do I control the text in strips? Specifically, I want to put in the > ranges generated in shingle(x) where x is continuous. with an answer from Deepyan Sarkar (see strip.new towards the end of this message). I assume that the answer worked back then, but I've tried
2005 Aug 15
4
return unique values from date/time class object
Background: OS: Linux Mandrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues I have a wind speed time series with a normal frequency distribution and a spike in the 5 metres/second bin. The most likely explanation is that the instrument was returning duplicate values at this speed. To check this, I want to extract all the unique
2009 Sep 03
3
goodness of "prediction" using a model (lm, glm, gam, brt, regression tree .... )
Dear R-friends, How do you test the goodness of prediction of a model, when you predict on a set of data DIFFERENT from the training set? I explain myself: you train your model M (e.g. glm,gam,regression tree, brt) on a set of data A with a response variable Y. You then predict the value of that same response variable Y on a different set of data B (e.g. predict.glm, predict.gam and so on).
2005 Jun 21
3
R-help
Background: OS: Linux Mandrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues Is there a function in R that is an equivalent of zoom in matlab? This is very useful for being able to magnify details in a plot. I have searched the help for "zoom", "interactive zooming", and "magnify". The R search
2004 May 20
2
irregular time series
Background: OS: Linux Mandrake 9.1 release: R 1.9.0 editor: Xemacs 21.4 frontend: ESS 5.1.23 --------------------------------- Colleagues I have two time series (upwelling index and water temperature) of evenly spaced, daily data over 18 months, but the upwelling index series has a gap of about 2 months right in the middle of it. I want to do the acf, pacf, ccf, and a cross-spectral analysis
2005 Mar 24
1
Prediction using GAM
Recently I was using GAM and couldn't help noticing the following incoherence in prediction: > data(gam.data) > data(gam.newdata) > gam.object <- gam(y ~ s(x,6) + z, data=gam.data) > predict(gam.object)[1] 1 0.8017407 > predict(gam.object,data.frame(x=gam.data$x[1],z=gam.data$z[1])) 1 0.1668452 I would expect that using two types of predict arguments
2008 May 16
1
gam negative.binomial
Dear list members, while I appreciate the possibility to deal with overdispersion for count data either by specifying the family argument to be quasipoisson() or negative.binomial(), it estimates just one overdispersion parameter for the entire data set. In my applications I often would like the estimate for overdispersion to depend on the covariates in the same manner as the mean. For example,
2005 Jan 06
1
Using the Rprofile file to automatically plot data on Sta rtup of R version 2.0.1.
Dear John, I belive your problem has to do with the sequence of startup. I think that .Rprofile is called before the required libraries are attached. You might like to try putting your code into a .First() function and run it that way. Cheers, Andreas Dr Andreas Kiermeier Statistician SARDI FOOD SAFETY PROGRAM 33 Flemington Street Glenside SA 5065 Phone: +61 8 8207 7884 Fax: +61 8
2008 Apr 09
1
mgcv::predict.gam lpmatrix for prediction outside of R
This is in regards to the suggested use of type="lpmatrix" in the documentation for mgcv::predict.gam. Could one not get the same result more simply by using type="terms" and interpolating each term directly? What is the advantage of the lpmatrix approach for prediction outside R? Thanks. -- View this message in context:
2005 Feb 27
1
prediction, gam, mgcv
I fitted a GAM model with Poisson distribution using the function gam() in the mgcv package. My model is of the form: mod<-gam(y~s(x0)+s(x1)+s(x2),family=poisson). To extract estimates at a specified set of covariate values I used the gam `predict' method. But I want to get estimate and standard error of the difference of two fitted values. Can someone explain what should I do? Thank
2007 Aug 08
1
prediction using gam
I am fitting a two dimensional smoother in gam, say junk = gam(y~s(x1,x2)), to a response variable y that is always positive and pretty well behaved, both x1 and x2 are contained within [0,1]. I then create a new dataset for prediction with values of (x1,x2) within the range of the original data. predict(junk,newdata,type="response") My predicted values are a bit strange
2011 Aug 10
0
GAM Prediction
I'm looking for the best way to do the following: run a set of GAM models, and then make predictions with new data. My problem is the size of the gam model object, I would like to strip it down to the bare minimum of information needed to apply the model to new data. For example, if this were a linear model, I would just keep the betas. If this were an ordinary spline fit, I think I
2010 Dec 30
0
prediction intervals for (mcgv) gam objects
As I understand it,  predict.lm(l ,newdata=nd ,interval="confidence") yields confidence bands for the predicted mean of new observations and lm.predict(l ,newdata=nd ,interval="prediction") yields confidence bands for new observations themselves, given an lm object l.   However with regard to {mgcv} although  predict.gam (g ,se.fit=TRUE ,interval= "prediction")