Displaying 20 results from an estimated 10000 matches similar to: "About Error message"
2011 Jun 20
3
About GAM in R, Need YOUR HELP!
I'm beginner in R! I have a lot of problems on R.....
I have three questions about GAM
1. What is the function of Gaussian distribution in GAM?(if I choose family
is Gaussian)
Is it used in the predictand value (Y)?
2. How to plot a graph the gam function?
For example: y<-gam(a~s(b),family=gaussian (link=log)
,Data)
how to plot x axis is s(b) and y axis is log a???
3. if I use GAM to
2011 Jun 21
5
please help for mgcv package
i read a book from WOOD, there's an example which is talking about the
pollutant.
library(gamair)
library(mgcv)
y<-gam(death~s(time,bs="cr",k=200)+s(pm10median,bs="cr")+s(so2median,bs="cr")+s(o3median,bs="cr")+s(tmpd,bs="cr"),data=chicago,family=Possion)
lag.sum<-function(a,10,11)
{n<-length(a)
b<-rep(0,n-11)
for(i in 0:(11-10))
2011 Oct 04
2
About stepwise regression problem
First of all, I have GAMs
noxd<-gam(newNOX~pressure+maxtemp+s(avetemp,bs="cr")+s(mintemp,bs="cr")+s(RH,bs="cr")+s(solar,bs="cr")+s(windspeed,bs="cr")+s(transport,bs="cr"),family=gaussian
(link=log),groupD,methods=REML)
Then I type " summary(noxd)". and show
Family: gaussian
Link function: log
Formula:
newNO2 ~ pressure
2011 Jun 19
2
please help! what are the different using log-link function and log transformation?
I'm new R-programming user, I need to use gam function.
y<-gam(a~s(b),family=gaussian(link=log),data)
y<-gam(loga~s(b), family =gaussian (link=identity),data)
why these two command results are different?
I guess these two command results are same, but actally these two command
results are different, Why?
--
View this message in context:
2011 Oct 13
3
Question about GAMs
hi! I hope all of you can help me this question
for example GAMs:
ozonea<-gam(newozone~
pressure+maxtemp+s(avetemp,bs="cr")+s(ratio,bs="cr"),family=gaussian
(link=log),groupA,methods=REML)
formula(ozonea)
newozone ~ pressure + maxtemp + s(avetemp, bs = "cr") + s(ratio,bs = "cr")
#formula of gams
coef(ozonea) # extract the coefficient of GAMs
2011 Oct 12
4
plot probability density function (pdf)
I have 2 series of variables, I want to plot the probability density function
of these 2 variabels (i.e. two curves in one graph), I just want to compare
these two variable distribution.
what should I do?
can I use ggplot2 package?
--
View this message in context: http://r.789695.n4.nabble.com/plot-probability-density-function-pdf-tp3897055p3897055.html
Sent from the R help mailing list archive
2012 Jun 01
4
Adding a column into the file
Dear all,
I have a lot of problems on R-programming.
for example
my csv. file is ..
Date wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta
21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664
22/10/2010 87.35 21.99 40.89 0 1300.408288 62.85352227
23/10/2010 88.38 21.71 28.04 0.01 1381.768284 54.80594493
24/10/2010 92.32 15.45 22.38 0.51 1113.90981 39.46573663
25/10/2010 93.42
2013 Nov 06
3
Nonnormal Residuals and GAMs
Greetings, My question is more algorithmic than prectical. What I am
trying to determine is, are the GAM algorithms used in the mgcv package
affected by nonnormally-distributed residuals?
As I understand the theory of linear models the Gauss-Markov theorem
guarantees that least-squares regression is optimal over all unbiased
estimators iff the data meet the conditions linearity,
2011 Sep 28
2
GAMs in R : How to put the new data into the model?
I have 5 GAMs ( model1, model2, model3, model4 and model5)
Before I use some data X(predictor -January to June data) to form a equation
and calculate the expected value of Y (predictand -January to June). After
variable selection, GAMs (Model 1)were bulit up! R-square :0.40
NOW, I want to use new X'( predictor -July - December data) and put into
Model 1, then get the expected value of Y'
2012 Jan 16
2
Object not found using GAMs in MGCV Package
This is my first time running GAMs in R.
My csv file has these column headings:
"X" "Y" "Sound" "Atlantic" "Blacktip" "Bonnet"
"Bull" "Finetooth" "Lemon" "Scalloped" "Sandbar" "Spinner"
"Abundance" "Diversity"
2012 Sep 06
2
Generalized additive models: Plots for Qualitative Data
Hello,
My name is Dontrece Smith. I am creating figures for my GAMs. I change my
qualitative variables to 1 or 2 in my dataset, so I would be able to run my
GAMs. However, R will only display plots for my quantitative variables and
not my qualitative variables. Is there any way to fix this issue? I listed
some of my code below:
> library(mgcv)
This is mgcv 1.7-13. For overview type
2009 Oct 13
2
How to choose a proper smoothing spline in GAM of mgcv package?
Hi, there,
I have 5 datasets. I would like to choose a basis spline with same knots in
GAM function in order to obtain same basis function for 5 datasets.
Moreover, the basis spline is used to for an interaction of two covarites.
I used "cr" in one covariate, but it can only smooth w.r.t 1 covariate. Can
anyone give me some suggestion about how to choose a proper smoothing spline
2005 Sep 20
1
Estimate predictor contribution in GAM models
hi,
i'm using gam() function from package mgcv.
if G is my gam object, then
>SG=summary(G)
Formula:
y ~ +s(x0, k = 5) + s(x1) + s(x2, k = 3)
Parametric coefficients:
Estimate std. err. t ratio Pr(>|t|)
(Intercept) 3.462e+07 1.965e+05 176.2 < 2.22e-16
Approximate significance of smooth terms:
edf chi.sq p-value
s(x0)
2005 Oct 05
3
testing non-linear component in mgcv:gam
Hi,
I need further help with my GAMs. Most models I test are very
obviously non-linear. Yet, to be on the safe side, I report the
significance of the smooth (default output of mgcv's summary.gam) and
confirm it deviates significantly from linearity.
I do the latter by fitting a second model where the same predictor is
entered without the s(), and then use anova.gam to compare the
2003 Jun 04
2
gam()
Dear all,
I've now spent a couple of days trying to learn R and, in particular, the
gam() function, and I now have a few questions and reflections regarding
the latter. Maybe these things are implemented in some way that I'm not yet
aware of or have perhaps been decided by the R community to not be what's
wanted. Of course, my lack of complete theoretical understanding of what
2011 Dec 09
3
gam, what is the function(s)
Hello,
I'd like to understand 'what' is predicting the response for library(mgcv)
gam?
For example:
library(mgcv)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101)
plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l")
I want to see the generalized function(s) used to predict the response
2007 Dec 13
1
Two repeated warnings when runing gam(mgcv) to analyze my dataset?
Dear all,
I run the GAMs (generalized additive models) in gam(mgcv) using the
following codes.
m.gam
<-gam(mark~s(x)+s(y)+s(lstday2004)+s(ndvi2004)+s(slope)+s(elevation)+disbinary,family=binomial(logit),data=point)
And two repeated warnings appeared.
Warnings$B!'(B
1: In gam.fit(G, family = G$family, control = control, gamma = gamma, ... :
Algorithm did not converge
2: In gam.fit(G,
2007 Apr 08
1
Relative GCV - poisson and negbin GAMs (mgcv)
I am using gam in mgcv (1.3-22) and trying to use gcv to help with model selection. However, I'm a little confused by the process of assessing GCV scores based on their magnitude (or on relative changes in magnitude).
Differences in GCV scores often seem "obvious" with my poisson gams but with negative binomial, the decision seems less clear.
My data represent a similar pattern as
2002 Nov 13
2
Comparing GAM objects using ANOVA
Hi,
Is it possible to compare two GAM objects created with the gam() function from the mgcv package. I use a slightly modified version of anova.glm() named anova.gam(), modified from John Fox (2002). It often gives me some aberant responses, especially with "F" test. I use a quasibinomial model and scale (dispersion) is calculated and used in the calculation of the F value. Does someone
2012 Jun 29
5
Insert row in specific location between data frames
Hi everyone! I have a simple question.
my data is
predict_SO2_a
1 39.793231
2 30.252578
3 32.467584
4 31.941509
5 27.908320
6 11.594137
7 9.368125
8 12.319093
9 11.558811
10 7.937192
11 11.211306
12 12.400342
13 12.393146
14 13.256160
15 10.709600
16 9.966334
17 28.850652
18 10.024405
I want