My question is: how can I calculate the confidence interval around the age spline for each of the interactions with household type so that I can determine if the dependant is stat sig different by household type at a given age?
To make the problem replicable, I've restated it below using the auto dataset:
Code:
sysuse auto mkspline weight 3 = weight, pctile reg price c.weight?#i.foreign mpg trunk, base
I have tried using lincom as below to see if the CIs overlap (they do, so I conclude that weight is not stat sig different by foreign at that weight), but I don't know if it's the correct approach or how to manually create the combination of CIs that lincom does.
Code:
list weight* if weight == 2830 lincom _b[0.foreign#c.weight1]*2640 + _b[0.foreign#c.weight2]*190 + _b[0.foreign#c.weight3]*0 lincom _b[1.foreign#c.weight1]*2640 + _b[1.foreign#c.weight2]*190 + _b[1.foreign#c.weight3]*0
0 Response to How can I calculate a confidence interval around a linear spline that it interacted with another variable
Post a Comment