My guess is that the model has identifiability problems and that this is then causing a problem (not caught properly) in the model fitting optimizer. Is there any chance you could send data that produces the problem (off list) and I can try it out (I will only use any data for this investigation, of course - but if the data is confidential then any suitably messed up version that also fails would be just as useful).

best,
Simon

On 31/03/17 16:58, Dean Force wrote:
Hello,


As a part of a larger project, I am trying to run a conditional logistic
regression to look at whether maternal age is implicated in the risk of
developing gestational diabetes. I am using a matched case-control design,
where mothers with GDM were individually matched with up to 6 controls
based on several parameters.


I run the following model:


model <- gam(gdm ~ s(maternal_age, bs="cr") + strata(risk_set) +
as.factor(district) + as.factor(riskfactor1)+as.factor(riskfactor2), data =
dt, family=cox.ph(), weights = wt)



weights are defined as 0 for censoring, 1 for event, and each subject has
one event/censoring time and one row of covariate values. In total there
are 1000 cases, matched to 5500 controls, so there are 1000 risk_set that I
define as strata.

When running the model, I keep getting the following error: “Error in
xat[[i]] : subscript out of bounds”. Am I doing something wrong?

Using mgcv_1.8.



Thank you!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273     http://www.maths.bris.ac.uk/~sw15190

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to