Hello all
I am creating 4 knots at these points: 3 19 21 30
As you can see from the dips in the curve shown here https://www.statalist.org/forums/for...ing-parameters
I have decided to use my knot locations rather than those recommended by Harell et al
My question is when I generate splines
This only generates 3 spline variables
Spline 1 = which is identical to var 1
Spline 2 variable - ok generated at knot 19
Spline 3 variable - every single observation is a zero EXCEPT the two observations which have a value of 36 and 19 at the original var1
My questions:
Why isn't a 4th spline generated ?
My ans is possibly related to the fact that only one person has a value of 36 therefore the 4th spline variable isn't generated?
I've tried to insert a snippet of the data, please bear with me as it's store on remote platform without internet
I am creating 4 knots at these points: 3 19 21 30
As you can see from the dips in the curve shown here https://www.statalist.org/forums/for...ing-parameters
I have decided to use my knot locations rather than those recommended by Harell et al
My question is when I generate splines
Code:
local knots_list 3 19 21 30 mkspline spline= var1, knot (`knots_list') cubic
Spline 1 = which is identical to var 1
Spline 2 variable - ok generated at knot 19
Spline 3 variable - every single observation is a zero EXCEPT the two observations which have a value of 36 and 19 at the original var1
My questions:
Why isn't a 4th spline generated ?
My ans is possibly related to the fact that only one person has a value of 36 therefore the 4th spline variable isn't generated?
I've tried to insert a snippet of the data, please bear with me as it's store on remote platform without internet