I want to run regression spline with B-spline basis function. The data is structured in such a way that the number of observations is less than the number of basis functions and I get a good result.
But I`m not sure if this is the correct case.
Do I have to have more rows than columns like linear regression?
Thank you.
Is it possible that the number of basic functions is more than the number of observations in spline regression?
306 Views Asked by Bahareh At
1
There are 1 best solutions below
Related Questions in REGRESSION
- My MSE and MAE are low, but my R2 is not good, how to improve it?
- The regression problem of predicting multiple outputs from two-dimensional inputs
- "wrong model type for regression" when attempting multinomial model with caret
- Regression equation of a stacked difference-in-difference analysis in R
- Plotting multiple grouped scatter graphs with regression lines on the same axes
- Calculate RMSE for RF regression hyperparameter tuning in GEE encountering issue with error "(...)List<FeatureCollection>."
- Error in eval(predvars, data, env) : object 'Juice_practice' not found when running binary logistic regression in r
- GMMAT model fit and AIC
- Fitting a curve using Linear regression - CLS and NMF
- Specific Dataset causes the glm.nb fucntion to crash for no apparent reason when attempting to perform regression
- names of data do not match with tip labels Error in R phylolm with Missing Data
- Fixed effect panel regression gives coefficients for each year
- Time series model specification
- Inlier subset is incoherent with is_data_valid in RANSAC
- ANN Loss not reducing for Boston house price Data Set
Related Questions in LINEAR-REGRESSION
- Batch Gradient Descent algorithm in python is returning huge values
- Error in running a multi-level mixed effects model on microbiome data
- How can I improve R2 score in my regression model? Predicting House Prices
- I have two dataframes representing two different time points. I want to run a linear regression model with data from both time points
- GMMAT model fit and AIC
- Fitting a curve using Linear regression - CLS and NMF
- Error with WLS estimation in R: missing or negative weights not allowed
- Fitted surface does not resemble the heatmap produced from the same data
- Beta coefficient of direct effect increases after controlling for mediator
- How to exclude abnormal data points and smooth the data before linear fitting
- Performing a simple ridge regression
- Why TukeyHSD test keeps returning NA for a linear model in R?
- Inquiry regarding a linear regression model using Python and pandas
- How to find the x-intercept of Weibull distribution
- PyTorch matrix multiplication shape error: "RuntimeError: mat1 and mat2 shapes cannot be multiplied"
Related Questions in SPLINE
- Function for two-dimensional smooth spline in R?
- Formula to inverse a function of integral-splines
- Bidimensional splines, strictly increasing in one argument
- Spline in R terms and wording - degree of the polynom - degree of freedom - degree of continuity - basisspline
- Cubic spline coefficients from Scipy Interpolate
- Scipy 2D interpolation not accomodating every point
- How can I get the local curvature of a scipy.CubicSpline?
- Generating Bezier curves/splines that have consistent variable distance from generating function
- Plot Spline in R
- Vaadin chart XAxis setMax does not work in combined chart
- Is there any c++ function similar to smoothbivariatespline from scipy.interpolate
- How do I change background and zoom settings in Spline Scene
- How to know the exact Knot on spline the game object is on in Unity?
- Infinite [.WebGL-00003D440AA60E00] GL_INVALID_FRAMEBUFFER_OPERATION Warning When Using Spline Design in Next 14
- Plotting a BSpline in Python and in Mathematica
Related Questions in BSPLINE
- Maintaining "upvector" in a BSpline
- Avoid writing large number of column names in a model formula with bs() terms
- Defining BSpline in SciPy knowing its degree, control points, knots, and weights
- Understanding scipy b-spline base interval
- How to calculate the following Jacobian on Lie group SO(3)?
- How do I fix the bug in my b-spline implementation: The figure always has a point on 0,0 coordinate
- Is it possible to use splines and b-splines cooperatively?
- Is there a way to create a factor table for spline terms using GAMs in Python's h2o
- Interpolation along a BSpline
- Does python have an analogue to R's splines::ns()
- Use B Spline Function on Networkx Graph
- How to select control points for B-spline smoothing from a set of points?
- geomdl approximate_surface not working as expected
- How to find arc length / curve length reparameterization of b-spline curve?
- How can I add this external library in my C code?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
When the number of observations, N, is small, it’s easy to fit a model with basis functions with low square error. If you have more basis functions than observations, then you could have 0 residuals (perfect fit to the data). But that is not to be trusted because it may not be representative of more data points. So yes, you want to have more observations than you do columns. Mathematically, you cannot properly estimate more than N columns because of collinearity. For a rule of thumb, 15 - 20 observations are usually needed for each additional variable / spline.
But, this isn't always the case, such as in genetics when we have hundreds of thousands of potential variables and small sample size. In that case, we turn to tools that help with a small sample size, such as cross validation and bootstrap.
Bootstrap (ie resample with replacement) your datapoints and refit splines many times (100 will probably do). Then you average the splines and use these as the final spline functions. Or you could do cross validation, where you train on a smaller dataset (70%) and then test it on the remaining dataset.
In the functional data analysis framework, there are packages in R that construct and fit spline bases (such as cubic, B, etc). These packages include
refund,fda, andfda.usc.For example,
B <- smooth.construct.cc.smooth.spec(object = list(term = "day.t", bs.dim = 12, fixed = FALSE, dim = 1, p.order = NA, by = NA),data = list(day.t = 200:320), knots = list())constructs a B spline basis of dimension 12 (over time, day.t), but you can also use these packages to help choose a basis dimension.