Dear colleagues, I would like to have GAM regression lines (package gam) thicker than the default setting does. Is there any way to change the width of regression line when plotting gam.objects from the package GAM with more than one predictor? Changing lwd parameter in plot function controls all line components, including points making them thicker as well, which is not what I would like to have. Thanks for help. Best, Emil ************************************************************** Emil Tkadlec Palacky University PrF UP Faculty of Science katedra ekologie Department of Ecology tr. Svobody 26 tr. Svobody 26 771 46 OLOMOUC 771 46 Olomouc tel. 58 563 4561 Czech Republic email: tkadlec at prfnw.upol.cz
Hi Emil, can you give us a working example of what you're trying to do? cheers! Sean ps. as per the posting-guide... :-) On 24/08/05, Tkadlec Emil <tkadlec at prfnw.upol.cz> wrote:> Dear colleagues, > I would like to have GAM regression lines (package gam) thicker than the default > setting does. Is there any way to change the width of regression line when plotting > gam.objects from the package GAM with more than one predictor? Changing lwd > parameter in plot function controls all line components, including points making them > thicker as well, which is not what I would like to have. > Thanks for help. > Best, > Emil > > ************************************************************** > Emil Tkadlec > Palacky University PrF UP > Faculty of Science katedra ekologie > Department of Ecology tr. Svobody 26 > tr. Svobody 26 771 46 OLOMOUC > 771 46 Olomouc tel. 58 563 4561 > Czech Republic > email: tkadlec at prfnw.upol.cz > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Hi Sean, my working example is simple. I am modeling a response variable, say y, using two quantitative predictors, say x1 and x2: model<-gam(y~s(x1)+s(x2) Then, I plot the model using plot(model, residuals=T,se=T) If I set par(mfrow=c(1,2)) before that, I get two nice figures for both predictors, with regression lines, s.e. envelopes and points. However, I would like to have the regression lines thicker to emphasize more the underlzing relationships between response and predictors, with everything else on the fig left unchanged. Hope it's enough Emil ************************************************************** Emil Tkadlec Palacky University PrF UP Faculty of Science katedra ekologie Department of Ecology tr. Svobody 26 tr. Svobody 26 771 46 OLOMOUC 771 46 Olomouc tel. 58 563 4561 Czech Republic email: tkadlec at prfnw.upol.cz
Emil, I've no clue what gam() does nor how it works, but saying that is it possible to use lines(,lwd=???) in someway and plot on top of the original line? cheers, Sean On 24/08/05, Tkadlec Emil <tkadlec at prfnw.upol.cz> wrote:> Sear Sean, > here is the more working example (I use the latest version of everything > on my PC): > > x1<-runif(100,-5,5) > x2<-runif(100,1,50) > e<-rnorm(100) > y<-.3*x1-0.5*x2+e > > mod<-gam(y~s(x1)+s(x2)) > par(mfrow=c(1,2)) > plot(mod,residuals=T,se=T) > -------- > So you get two figs. My concern is to enlarge the regression line, not the > point or enything else. > Best, > Emil > > > > > Hi Emil, > > can you give us a working example of what you're trying to do? > > > > cheers! > > Sean > > > > ps. as per the posting-guide... :-) > > > > On 24/08/05, Tkadlec Emil <tkadlec at prfnw.upol.cz> wrote: > > > Dear colleagues, > > > I would like to have GAM regression lines (package gam) thicker than > > > the default setting does. Is there any way to change the width of > > > regression line when plotting gam.objects from the package GAM with > > > more than one predictor? Changing lwd parameter in plot function > > > controls all line components, including points making them thicker > > > as well, which is not what I would like to have. Thanks for help. > > > Best, Emil > > > > > > ************************************************************** > > > Emil Tkadlec > > > Palacky University PrF UP > > > Faculty of Science katedra ekologie > > > Department of Ecology tr. Svobody 26 > > > tr. Svobody 26 771 46 OLOMOUC > > > 771 46 Olomouc tel. 58 563 4561 > > > Czech Republic > > > email: tkadlec at prfnw.upol.cz > > > > > > ______________________________________________ > > > R-help at stat.math.ethz.ch mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide! > > > http://www.R-project.org/posting-guide.html > > > > > > ************************************************************** > Emil Tkadlec > Palacky University PrF UP > Faculty of Science katedra ekologie > Department of Ecology tr. Svobody 26 > tr. Svobody 26 771 46 OLOMOUC > 771 46 Olomouc tel. 58 563 4561 > Czech Republic > email: tkadlec at prfnw.upol.cz > ************************************************************** > >
Apparently Analagous Threads
- Exporting of R dendrogram object in the format of EisenĀ“s Cluster
- sys.time question - how to improve R performance
- glm and overdispersion
- Constructin a call of function including permutation of column names - how to escape parentheses?
- features of save and save.image (unexpected file sizes)