Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
62 views

I fit a hierarchical generalized additive model with a sum to zero smooth interactions (bs="sz"). I would like to take the first derivative and plot the simultaneous confidence interval in ...
Camila's user avatar
  • 11
1 vote
1 answer
34 views

I'm trying to plot a factor-smooth term bs='fs' from my model, but I keep getting this error from gratia::draw(mod): Error in seq.default(from = lower, to = upper, length.out = n) : 'length.out' must ...
Nate's user avatar
  • 489
1 vote
2 answers
119 views

I would like to change the title of the plot and the labels on the x and y axes without modifying the variable names in the dataframe. I am using the gratia package. library(patchwork) library(gratia) ...
F3d33's user avatar
  • 13
1 vote
1 answer
106 views

Using the draw function from the gratia package with a model that contains a smooth s(longitude, latitude) will plot a long-lat plot and effect contours. That's very nice! I want to add a country ...
David's user avatar
  • 107
0 votes
0 answers
124 views

Consider the multinomial GAM with mgcv in R library(mgcv) multinom = gam(list(sound ~ word + s(long, lat), ~ word + s(long, lat), ~ word + s(long, ...
David's user avatar
  • 107
0 votes
1 answer
411 views

I have a data set with 40 sites (long, lat) by 2 ages by 2 genders by 6 words and 6 dependent sound categories (coded 0 to 5) as simulated here: sound <- sample(0:5, size=960, replace=T) ...
David's user avatar
  • 107
1 vote
1 answer
76 views

I am using the wonderful gratia package to visualize multiple gam models from the mgcv package using the compare_smooths function. While I am able to create the gams properly and draw them, I cannot ...
flâneur's user avatar
  • 351
2 votes
1 answer
312 views

I created a GAM model using mgcv. My response variable is log transformed. I would like to plot this model using gratia. However, I want to make sure the y-axis is exponentiated after I plot it using ...
Eazye's user avatar
  • 21
2 votes
2 answers
290 views

I cannot add points to the diagram of GAM results displayed with the plot_smooths() function of tidymv package. I would like to add points to the diagram of GAM results displayed with the plot_smooths(...
RHT's user avatar
  • 23
1 vote
1 answer
7k views

I am trying to draw GAMs in R using the below code. This code always used to work, and I could draw the partial effect of my smoothed term, but randomly it no longer works, consistently triggering ...
0 votes
0 answers
259 views

I have count data of a species which I am modelling using GAMs with negative binomial and Tweedie families. I want to compare the models visually using rootograms. This works fine for the negative ...
DMAD Tim's user avatar
1 vote
1 answer
107 views

I'm getting this warning after checking the variance components of my model. I don't have NA's and the warning goes away when I remove this s(CYR.std, fSite, bs = "fs") term. Is it possibly ...
Nate's user avatar
  • 489
1 vote
2 answers
279 views

I'm hoping to plot my global effect s(CYR.std), along with my site deviations s(CYR.std, fSite, bs = "fs") term in ggplot. I can plot one at a time, but can't figure out how to include both ...
Nate's user avatar
  • 489
2 votes
1 answer
442 views

I am using the draw and compare_smooths functions in the gratia package in R to create plots visualizing smooths from two logistic GAMs. I would like to edit these plots to (1) include raw data; (2) ...
m123's user avatar
  • 33
1 vote
1 answer
140 views

Say I'm using mgcv in R to model a time trend with seasonality that changes over time, say te(year, month) ... Is it possible or even logical to generate a smooth estimate or fitted values for year ...
Mike Dunbar's user avatar

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /