# Spline fitting demo inc comparison of sparse vs non-sparse

**URL:** <https://discourse.mc-stan.org/t/spline-fitting-demo-inc-comparison-of-sparse-vs-non-sparse/3287>\
**Category:** Modeling\
**Created:** [February 13, 2018, 2:59pm UTC](https://discourse.mc-stan.org/t/spline-fitting-demo-inc-comparison-of-sparse-vs-non-sparse/3287 "2018-02-13T14:59:42Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![andre.pfeuffer](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@andre.pfeuffer](https://discourse.mc-stan.org/u/andre.pfeuffer)\
**Post date:** [February 13, 2018, 3:36pm UTC](https://discourse.mc-stan.org/t/spline-fitting-demo-inc-comparison-of-sparse-vs-non-sparse/3287/6 "2018-02-13T15:36:01Z")

</div>

> [@martinmodrak](#):
>
> splines::bs(0:10, degree = 3, df = 4)

Isn’t that something like a sum-to-zero constraint? Anyway, if  
you add a column of 1’s as Intercept, the design matrix has  
full rank. It don’t see the problem at the moment.

> rankMatrix(cbind(splines::bs(0:10, degree = 3, df = 4),1))  
> [1] 5  
> attr(,“method”)  
> [1] “tolNorm2”  
> attr(,“useGrad”)  
> [1] FALSE  
> attr(,“tol”)  
> [1] 2.442491e-15

---

_[View the full topic](https://discourse.mc-stan.org/t/spline-fitting-demo-inc-comparison-of-sparse-vs-non-sparse/3287)._
