Displaying 20 results from an estimated 10000 matches similar to: "Testing additive nonparametric model"
2006 Sep 04
2
Fitting generalized additive models with constraints?
Hello,
I am trying to fit a GAM for a simple model, a simple model, y ~ s(x0) +
s(x1) ; with a constraint that the fitted smooth functions s(x0) and s(x1)
have to each always be >0.
>From the library documentation and a search of the R-site and R-help
archives I have not been able to decipher whether the following is possible
using this, or other GAM libraries, or whether I will have to try
2002 Jan 31
2
Help with Bootstrap function.
Dear List
I am using R with mcgv package to model spatial variation in density estimates of dorcas gazelle in Sinai. I have 59 points of data and 4 explanatory variables(distance from mountain edge, camel presence, Latitude & Longitude). I want to test the model fir via bootstraping. I have used the jacknife bootstraping but it have the limitation of allowing only 58 trials. I tried to use the
2011 Mar 28
2
mgcv gam predict problem
Hello
I'm using function gam from package mgcv to fit splines. ?When I try
to make a prediction slightly beyond the original 'x' range, I get
this error:
> A = runif(50,1,149)
> B = sqrt(A) + rnorm(50)
> range(A)
[1] 3.289136 145.342961
>
>
> fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE)
> predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE)
Error
2003 Jun 05
1
partial residuals in plot.gam()
All,
Sorry for bombarding you with GAM related questions, but...
I know a partial residual option in plot.gam() is on Simon Wood's todo
list, but since I'm in the midst of a project and not yet having acquired
sufficient R knowledge to code something usable myself I'll have to put my
trust in you. Anybody got some code lying around for doing this? Or if
someone can supply me with
2000 Apr 30
0
Help Need with aov()
Hi there,
I'm using R1.0.1 Windows 98.
This file contains some inputs and an aov function code. Can someone
check it for me? Somehow I got completely different answer when typing
them in R and in Splus.
Splus gives me this:
> summary( Turnip.aov )
Error: Blocks
Df Sum of Sq Mean Sq F Value Pr(F)
Residuals 3 163.7367 54.57891
Error: Plots %in% Blocks
2002 Sep 15
7
loess crash
Hi,
I have a data frame with 6563 observations. I can run a regression with
loess using four explanatory variables. If I add a fifth, R crashes. There
are no missings in the data, and if I run a regression with any four of the
five explanatory variables, it works. Its only when I go from four to five
that it crashes.
This leads me to believe that it is not an obvious problem with the data,
2000 May 01
1
GAMs under R?
At 06:09 AM 5/1/00 +0100, Prof Brian D Ripley wrote:
>On Sun, 30 Apr 2000, Stephen R. Laniel wrote:
>
>> I was just now surprised to note that functions to go generalized additive
>> models don't appear to exist under R 1.000. In particular, the gam() and
>> loess() functions aren't there. Are they hidden somewhere and I just
>> haven't noticed?
>
2012 Apr 26
1
variable dispersion in glm models
Hello,
I am currently working with the betareg package, which allows the fitting of a variable dispersion beta regression model (Simas et al. 2010, Computational Statistics & Data Analysis). I was wondering whether there is any package in R that allows me to fit variable dispersion parameters in the standard logistic regression model, that is to make the dispersion parameter contingent upon
2007 Oct 05
2
Splines
I want to fit a cubic spline of x on y. where :
x
[1] 467 468 460 460 450 432 419 420 423 423
y
[1] 1 2 3 4 5 6 7 8 9 10
using the syntax
spline(y, x)
I got following output :
$x
[1] 1.000000 1.310345 1.620690 1.931034 2.241379 2.551724 2.862069
[8] 3.172414 3.482759 3.793103 4.103448 4.413793 4.724138 5.034483
[15] 5.344828 5.655172
2011 Dec 16
1
mgcv 1.7-12 crashes R
Dear community,
I encountered a very disturbing phenomenon today:
When I try to fit any gam() with mgcv R aborts. I could not find any post
regarding this in google, which mades in even more strange.
I am using the latest Ubuntu, latest R and latest mgcv everything up to
date. The crash occured too with the last mgcv 1.7-11.
This is the output from the R shell:
<pre>
R version 2.14.0
2001 Dec 19
1
Pearson residuals in quasi family
Hi all,
This is a very silly question or something escapes me:
Let obj a simple gam poisson model. Let
>obj<-gam(....,family=poisson)
>obj1<-update(obj, family=quasi(link="log", var="mu"))
>From summary.glm(obj1) the dispersion parameter is estimated 1.165; In fact
it is:
> (predict(obj1, se.fit=T)$se.fit[1:5]/predict(obj, se.fit=T)$se.fit[1:5])^2
4
2006 Dec 04
1
package mgcv, command gamm
Hi
I am an engineer and am running the package mgcv and specifically the
command gamm (generalized additive mixed modelling), with random
effects. i have a few queries:
1. When I run the command with 1000/2000 observations, it runs ok.
However, I would like to see the results as in vis.gam command in the
same package, with the 3-d visuals. It appears no such option is
available for gamm in the
2005 Mar 03
1
Negative binomial regression for count data
Dear list,
I would like to fit a negative binomial regression model as described in "Byers AL, Allore H, Gill TM, Peduzzi PN., Application of negative binomial modeling for discrete outcomes: a case study in aging research. J Clin Epidemiol. 2003 Jun;56(6):559-64" to my data in which the response is count data. There are also 10 predictors that are count data, and I have also 3
2008 Feb 16
2
Possible overfitting of a GAM
The subject is a Generalized Additive Model. Experts caution us against
overfitting the data, which can cause inaccurate results. I am not a
statistician (my background is in Computer Science). Perhaps some kind soul
would take a look and vet the model for overfitting the data.
The study estimated the ebb and flow of traffic through a voting place. Just
one voting place was studied; the
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN,
which implements "Generalized Additive Models".
This implementation follows closely the description in
the GAM chapter 7 of the "white" book "Statistical Models in S"
(Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy
in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN,
which implements "Generalized Additive Models".
This implementation follows closely the description in
the GAM chapter 7 of the "white" book "Statistical Models in S"
(Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy
in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2012 Jun 21
2
check.k function in mgcv packages
Hi,everyone,
I am studying the generalized additive model and employ the package 'mgcv'
developed by professor Wood.
However,I can not understand the example listed in check.in function.
For example,
library(mgcv)
set.seed(1)
dat <- gamSim(1,n=400,scale=2)
## fit a GAM with quite low `k'
b<-gam(y~s(x0,k=6)+s(x1,k=6)+s(x2,k=6)+s(x3,k=6),data=dat)
plot(b,pages=1,residuals=TRUE)
2010 Mar 04
2
which coefficients for a gam(mgcv) model equation?
Dear users,
I am trying to show the equation (including coefficients from the model
estimates) for a gam model but do not understand how to.
Slide 7 from one of the authors presentations (gam-theory.pdf URL:
http://people.bath.ac.uk/sw283/mgcv/) shows a general equation
log{E(yi )} = ?+ ?xi + f (zi ) .
What I would like to do is put my model coefficients and present the
equation used. I am an
2007 Jul 25
3
loess prediction algorithm
Hello,
I need help with the details of loess prediction algorithm. I would like
to get it implemented as a part of a measurement system programmed in
LabView. My job is provide a detailed description of the algorithm. This
is a simple one-dimensional problem - smoothing an (x, y) data set.
I found quite a detailed description of the fitting procedure in the "white
book". It is also
2005 Sep 26
4
p-level in packages mgcv and gam
Hi,
I am fairly new to GAM and started using package mgcv. I like the
fact that optimal smoothing is automatically used (i.e. df are not
determined a priori but calculated by the gam procedure).
But the mgcv manual warns that p-level for the smooth can be
underestimated when df are estimated by the model. Most of the time
my p-levels are so small that even doubling them would not result