Questions tagged [splines]
Splines are flexible functions, knit together from polynomial parts, used for approximation or smoothing. This tag is for any kind of spline (eg, B-splines, regression splines, thin-plate splines, etc).
678 questions
2
votes
1
answer
61
views
Can a two-segment fixed-effects model be combined with only one random linear slope on the underlying time variable (given only 3 timepoints)?
I’m analyzing longitudinal data with three timepoints:
Time 0 = baseline
Time 12 = post-treatment
Time 24 = follow-up
Because the treatment occurs at Time 12, I’m modeling a potential change in ...
6
votes
1
answer
166
views
Calculate confidence intervals for spline after change in reference- manually
How do I calculate confidence intervals for a spline function after changing the reference?
I would like to plot the spline with reference at age=52 along with the confidence limits.
...
5
votes
0
answers
117
views
When should I use which smooth/spline in GAMs (for non-mathematicians)?
I delved a bit deeper lately into GAMs and I have the feeling, the more I go into detail the more questions are popping up (well, as usual, I'd say).
I recognized here and there, that there are plenty ...
2
votes
0
answers
65
views
Interpretation of multiple p-values and spline x continuous interactions for splines terms
I’m fitting a binary logistic regression model that includes a continuous variable modeled using natural splines, and I’ve also included an interaction between that spline variable and another ...
5
votes
1
answer
225
views
Number of knots in splines (internal vs total)
I’m trying to understand how natural cubic splines (splines::ns) and restricted cubic splines (rms::rcs) handle knots — ...
1
vote
1
answer
51
views
chi-squared significant for dose-response function obtained through meta-analysis but confidence interval around plotted predicted values not
The question:
I obtained a dose-response function (predictor vs relative risk) through meta-analysis using the dosresmeta package for R. The package applies a random effects model (REML)and I fitted a ...
2
votes
1
answer
77
views
Longitudinal intervention vs control with nonlinear rise–decay: phase-aware natural cubic spline mixed model?
Design:
18 participants total (12 intervention, 6 control).
Intervention group consumes a nutritional supplement once daily for 5 consecutive days; control group abstains throughout.
Outcomes are ...
5
votes
2
answers
177
views
Time dependent coefficients for cox-ph model, how to model it?
I am modeling a CNS cancer survival data and my cox-ph model violates the PH assumption on most of the variables. Therefore I decided to model the time dependent coefficients accordingly, I thought ...
5
votes
1
answer
235
views
3-part linear spline middle segment fitting in wrong direction?
I'm fitting a 3-part linear spline using the lspline package to model a time series with two known disruption periods. The knots are fixed at the disruption periods ...
3
votes
1
answer
71
views
F statistic for spline terms in generalized additive model
I am performing a regression analysis using a generalized additive model, 2 spline terms and 12 linear terms. When I use the summary(gam_model) command, I get some F statistics for my 2 spline terms. ...
0
votes
0
answers
73
views
Multivariable linear regression model with continuous predictors with a spike at 0
I want to build a prediction model of a continuous outcome Y. I have ~50 predictors that are count variables (number of hospitalizations by cause, number of drugs dispensed by type of drug). I was ...
3
votes
1
answer
81
views
Interpreting hurdle model output with splines
I am trying to determine which variables affect the likelihood of lumpfish eating salmon lice and which variables predict the number of lice eaten. My data are highly zero-inflated, so I decided to ...
1
vote
0
answers
51
views
Multiple imputation and modelling using penalised splines [closed]
I ran multiple imputation in R using mice. Only one categorical variable had missingness and I specified the imputation model to imputate it using ...
2
votes
1
answer
147
views
Automatic fitting of constrained linear splines with fixed knots and slope sign constraints
I need to fit multiple constrained 3-part linear splines to nighttime lights time series data to model responses to disruptions (knots) with known start/end dates. Each spline has three segments:
fa: ...
3
votes
2
answers
218
views
Robust sandwich estimator for a misspecified penalized Cox model
Using R survival package, I built a Cox model (discussed here) with pspline() terms. This is a large model with about 900,000 ...