panelr icon indicating copy to clipboard operation
panelr copied to clipboard

wbm doesn't work with natural cubic spline

Open Nr051190 opened this issue 5 years ago • 1 comments

Hi,

When running the WBM, inputting either ns or bs from base R leads to the following dplyr error:

Error: Problem with mutate() input bs(age, df = 6). x Input bs(age, df = 6) must return compatible vectors across groups ℹ Input bs(age, df = 6) is bs(age, df = 6). ℹ Result type for group 1 (id = "1833965"): . ℹ Result type for group 2 (id = "68008847"): .

I thought this might have been a problem with LME4, but glmer works fine with a spline.

Nr051190 avatar Oct 04 '20 16:10 Nr051190

Thank you for reporting this. The way I'm doing the data transformations, I'm not surprised that this fails because I didn't take this sort of usage into consideration. I should be able to deal with this, but it will likely take some time for me to implement that I don't have at the moment. I do think it's worthwhile, though.

jacob-long avatar Nov 17 '20 17:11 jacob-long