[R] Penalised spline regression

David Mcnulty David.Mcnulty at uhb.nhs.uk
Tue Apr 26 14:25:19 CEST 2016

Good Afternoon Everyone,

I am looking for advice fitting a linear mixed model where the random components do not seem to fit within the model formulae for lmer. The columns of Z are not stratified and have the notional random formula (z1 | 1) + ... + (zk | 1). 

I am fitting a penalised thin plate spline with knots k1 to kn. The basis functions Zk are |x-ki|^3 and the penalty matrix has elements |ki-kj|^3. Rather than fit basis functions Zk I have transformed the basis to Z = Zk %*% penalty^(-1/2).

Full details are in section 2: Bayesian analysis for penalised spline regression using winBUGS. https://www.jstatsoft.org/article/view/v014i14/v14i14.pdf

I am specifically looking for an alternative to the function spm() in package semipar.

Thank you for any help or advice.


David Mcnulty
Medical Statistician
Tel: +44 (0) 121 371 2448  
Internal: 12448     
Email: David.Mcnulty at uhb.nhs.uk 
Web: http://www.uhb.nhs.uk  

Health Informatics - University Hospitals Birmingham NHS Foundation Trust
Yardley Court, 11-13 Frederick Road, Edgbaston
Birmingham, B15 1JD

The Health Informatics Department is a team of specialist NHS information analysts who work together to provide analysis solutions. The Team filters, analyses and presents comprehensive information that empowers NHS professionals to make informed decisions. 

More information about the R-help mailing list