Skip to main content
10 events
when toggle format what by license comment
Dec 21, 2024 at 21:34 comment added stats_noob ah I think I understand! the model you wrote is also a random effects model!
Dec 17, 2024 at 20:11 comment added Gavin Simpson @user_436830 1) The s(city, bs = "re") is modelling the group (city) means. The "sz" basis contains these group means so we don't want to include those twice. Hence my removing the ranef term. 2) yes, s() and ti() have different defaults for the basis and the dimension of the basis - my last paragraph could have had more detail, but that's what I was trying to get at there - you will want to set k and the basis bs arguments in those smooths to make them all use the same basis.
Dec 17, 2024 at 14:28 comment added stats_noob Hi Roland, thank you for the paper reference I will check it out. Do you have any opinions on these 2 comments I posted here?
Dec 17, 2024 at 6:24 comment added Roland @user_436830 Have you read this paper? peerj.com/articles/6876
Dec 17, 2024 at 3:58 comment added stats_noob 2) in your r code, you use ti(x1) and ti(x2). will there be a difference if instead I use s(x1) and s(x2)? I ask this question because ti() is supposed to be an interaction, but I only variable in each ti() ... does this mean interaction with 1?
Dec 17, 2024 at 3:58 comment added stats_noob 1) My original R code had a random effect on city : s(city, bs = "re") . I see that your code, you have removed the random effects? is there any reason? is it ok for me to put random effects here? (I have a feeling that perhaps bs = "sz" is somehow a random effect)?
Dec 17, 2024 at 3:48 comment added stats_noob Thank you Gavin! Some questions I had:
Dec 17, 2024 at 3:14 vote accept stats_noob
Dec 16, 2024 at 17:14 history edited Nick Cox CC BY-SA 4.0
deleted 1 character in body
Dec 16, 2024 at 15:31 history answered Gavin Simpson CC BY-SA 4.0