# Tagged Questions

The tag has no wiki summary.

64 views

### Which one to use Splines / Interaction or both?

I am modeling a binary event of whether a sale will happen or not for an online retailer. I have millions of clicks to refer to. Needless to say the rate of sales happening is very very low (<1%). ...
71 views

### Centering when using splines in R

I am having trouble understanding why centering seems to only work with simple linear models and not with splines for example. I am using centering to report the estimated group differences at ...
50 views

### Getting the prediction standard error from a natural spline fit

I'm fitting a natural spline fit to some data points. I'd like to estimate the prediction error for the predicted value. In linear regression (I agree that natural spline is also a linear regression ...
61 views

### Detecting outliers using 95% PI around a natural spline fit

Please see the picture below: I wanted to mark the points that are not consistent with their adjacent points as outlier. What I did was to fit a natural spline fit to 1000 observations (the purple ...
146 views

### Multicollinearity and Splines :: Is there a problem?

When using natural (i.e. restricted) cubic splines, the basis functions created are highly collinear, and when used in a regression seem to produce very high VIF (variance inflation factor) ...
110 views

### time series decomposition/dtrending using splines

Is there a way/method/approach to decompose a time series data using regression splines: Seasonal time series into trend+seasonal+random component ? A non seasonal time series into trend+random ...
78 views

### Fitting a constrained natural spline

Why I think I need to fit a constrained natural spline I'm working with IBI (interbeat intervals). The measured IBI's include some invalid values. I'm working on an imputation algorithm to impute for ...
53 views

### Outlier detection/imputation - discussion

Introduction: I'm working with heart rate data. IBI (InterBeat Interval) is defined as the time period between any two consecutive heart beat and is usually measured in millisecond. I have followed a ...
117 views

### How to translate the output from an lm() fit with a cubic spline into a regression equation

I have some code and output, and I would like to construct a model. I don't know how to construct a model using this output: ...
208 views

### Piecewise linear regression with knots as parameters

I would like to fit a piecewise linear regression with knots as parameters. I would like to know what's the best solution. Should I run a set of regressions with all the possible knots and choosing ...
77 views

### Implementation of M-spline in R

I am implementing M-spline in R as defined here : http://www.fon.hum.uva.nl/praat/manual/spline.html and originally in Ramsay (1988). In short, we define a list of knots $t$ such that : ...
345 views

### How to predict new data with spline/smooth regression

Can anyone help give a conceptual explanation to how predictions are made for new data when using smooths /splines for a predictive model? For example, given a model created using ...
96 views

### Is there any R package can smooth the coefficients as a function of coefficients sequence?

I want to do some regression analysis that constrains the coefficients to vary smoothly as a function of their sequence. It is similar to the "Phoneme Recognition" example in the part 5 "Basis ...
60 views

### Causal identification and penalized splines

I just got a rejection from an economics journal. Among the reasons cited for rejection were: the benefits of using the semi-parametric method are not clearly brought out compared to ...
124 views

### (Spline) curve fitting $(x,y)$ points when $dy/dx$ is also known for each point

I have an $(x,y)$ dataset consisting of points on an unknown curve and I've been using spline fits to generate a curve joining these points as a guide-to-the-eye (and nothing more). However, I also ...
1k views

### Are splines overfitting the data?

My problem: I recently met a statistician that informed me that splines are only useful for exploring data and are subjected to overfitting, thus not useful in prediction. He preferred exploring with ...
154 views

### Using regression splines for values outside of the calibration range

in my question on a load forecast model using temperature data as covariates I was advised to use regression splines. This really seems to be a/the solution. Now I face the following problem: if I ...
58 views

### Nested spline based learning algorithms using stepwise model selection

I am interested in setting up a general forward model selection algorithm for simulating outcomes in multiple imputation. I am binning the outcome into deciles (or possibly a more granular level ...
141 views

### Intuition behind tensor product interactions in GAMs (MGCV package in R)

Generalized additive models are those where $$y = \alpha + f_1(x_1) + f_2(x_2) + e_i$$ for example. the functions are smooth, and to be estimated. Usually by penalized splines. MGCV is a package ...
293 views

### Wild cluster bootstrap seems really simple. Too simple. Am I missing someting?

I've been dealing with the problem of how to construct confidence intervals on penalized spline estimators in the presence of cluster-wise auto-correlation and heteroskedasticity. My previous thread ...
105 views

### Penalized spline confidence intervals based on cluster-sandwich VCV

This is my first post here, but I've benefited a lot from this forum's results popping up in google search results. I've been teaching myself semi-parametric regression using penalized splines. ...
60 views

### What might be wrong when my gamm fit is perfectly linear despite my spline term?

I'm using Wood's gamm4 R package and I run: ...
167 views

### Sparse matrix representation of a spline interpolation

I use spline interpolation within a statistical model, and the transpose of the operator turns up in the gradient of the log-likelihood. Let me set up some notation first. If $x_1 \ldots x_n$ are a ...
333 views

### Can lmer() use splines as random effects?

Say we're working on a random effects model of some count data over time, and we want to control for some trends. Normally, you'd do something like: ...
253 views

### Modeling a spline over time — design matrix and survey of approaches

A response variable y is a nonlinear function of a number of predictor variables X (in my real data the response is binomially distributed, but here I'm using a normally-distributed value for ...
78 views

### Can you use a spline function of the spatial coordinates to control for spatial autocorrelation? [duplicate]

Possible Duplicate: Why does including latitude and longitude in a GAM account for spatial autocorrelation? I am interested in the effect of a predictor vector $X_i$ on a binary outcome ...
79 views

### Testing interaction b/t group & longitudinal change for only part of the age range

I've fit a mixed linear model to some longitudinal data. I'm interested in the differences in patterns of decrease in the dependent variable according to group status, and my hypothesis particularly ...
1k views

### Finding local extrema of a density function using splines

I am trying to find the local maxima for a probability density function (found using R's density method). I cannot do a simple "look around neighbors" method (where ...
765 views

### Spline fitting in R - how to force passing two data points?

I am using "smooth.spline" in R. Here is a snippet from the documentation: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/smooth.spline.html smooth.spline {stats} R Documentation Fit a ...
159 views

### Visualizing a spline basis

Textbooks typically have nice example plots of of the basis for uniform splines when they're explaining the topic. Something like a row of little triangles for a linear spline, or a row of little ...
396 views

### What do interactions of spline and non-spline terms mean?

If I fit my data with something like lm(y~a*b), in R syntax, where a is a binary variable and ...
239 views

### Curve smoothing in the presence of non-gaussian uncertainty

What options are available for smoothing 2-dimensional real data for which the the ordinate points are real intervals of the form $(x_j , [y_{j0} , y_{j1}])$ In my case, the data is vague because of ...
440 views

### State-of-the-art in smoothing splines

What is the state-of-the-art in the efficient computation of smoothing splines? The algorithm I see mentioned most often is that of Reinsch, dating back to 1967. As I understand it, the most ...
113 views

### Monte Carlo test for comparing curvature of binomial response surfaces from effective degrees of freedom of GCV-fitted splines

I would like to compare the curvature of two response surfaces, each of the form: binomial ~ continuous variables1-5 I think it would be appropriate to use the effective degrees of freedom of a ...
237 views

### Spline df selection in a general additive Poisson model problem

I've been fitting some time series data using a Poisson general additive model using SAS's PROC GAM. Generally speaking, I've been having it's built-in generalized ...
309 views

### How to draw B-spline plots via the PROC GLIMMIX procedure in SAS?

Recently I found that the PROC GLIMMIX procedure in SAS added a statement effect, which can handle B-spline in models. I tried ...
375 views

### How are piecewise cubic spline bases constructed?

There are words from the The Elements of Statistical Learning on page 119: It is not hard to show that the following basis represents a cubic spline with knots at $\xi_1$ and $\xi_2$: ...
186 views

### Splines with controllable degree but auto-generation of knots in R

I'm using smooth.spline with some success, but I need to control the degree of the regressions between knots (cubic is too high for my needs). I looked at the ...
1k views

### Comparing smoothing splines vs loess for smoothing?

I wish to better understand the pros/cons for using either loess or a smoothing splines for smoothing some curve. Another variation of my question is if there is a way to construct a smoothing spline ...
2k views

### Minimum number of observations per variable for linear regression or MARS model

How many cases are required for each variable in order to build a linear regression model and/or a Multivariate Regression Splines Model? Also, Is it a rule of thumb, or does there exist a ...
308 views

### Getting spline coefficients in R

I'm fitting a natural basis spline on a data set of the form: splineModel=lm(dist~bs(speed, df=3), data=cars) using bs ...
727 views

### Kalman filter vs. smoothing splines

Q: For which data is it appropriate to use state-space modeling and Kalman filtering instead of smoothing splines and vice versa? Is there some equivalence relationship between the two? I'm trying ...
317 views

### Smoothing splines with multiple independent variables in R

I'm using smooth.spline for some basic smoothing splines. However, I need to switch to a function that allows me to use multiple independent variables. I'm having ...
336 views

### Is there a package for R that allows smoothing splines in GEE?

I run into a problem where I would like to build a GEE in R with cubic regression splines (or any other spline type) for a longitudinal data set and an urgent need for grouping and multiple ...
238 views

### Definition of “degree of interaction” in the MARS model

What exactly is the meaning of the "degree of interaction" or "interaction degree" in the MARS model? e.g. R: earth(..., degree=2)
1k views

### Fitting multivariate, natural cubic spline

note: with no correct answers after a month, I have reposted to SO Background I have a model, $f$, where $Y=f(\textbf{X})$ $\textbf{X}$ is an $n \times m$ matrix of samples from $m$ parameters and ...
800 views

### Calculation of natural cubic splines in R

I am new to the use of cubic splines for regression purposes and wanted to find out 1) What is a good source (besides ESL which I read but am still uncertain) to learn about splines for regression? ...
435 views

### Interactions between non-linear predictors

I have data on 70,000 students, nested in 120 schools. I'm starting with fixed effects for the schools, but at some point I might start letting intercepts and slopes vary. Some key predictors ...