dewittpe / cpr

Control Polygon Reduction: Methods for quick and efficient placement of internal knots for B-splines and tensor products of B-splines.
http://www.peteredewitt.com/cpr/
2 stars 0 forks source link

Error: building data sets and handling ... in cp calls #32

Closed dewittpe closed 11 months ago

dewittpe commented 7 years ago
library(cpr)
library(geepack)
cp_gee  <- cp(log10(pdg) ~ bsplines(day, df = 10),
              id = id,
              method = geeglm,
              data = spdg,
              keep_fit = TRUE)

## Error in eval(extras, data, env) : object 'id' not found

traceback(max.lines = 5)                                                                                                                                                            
## 10: eval(extras, data, env)                                                                                                                                                           
## 9: eval(extras, data, env)                                                                                                                                                            
## 8: model.frame.default(formula = f_for_use, data = data_for_use,                                                                                                                      
##        id = id)                                                                                                                                                                       
## 7: model.frame(formula = f_for_use, data = data_for_use, id = id)
## 6: eval(mftmp, parent.frame())                                       
## 5: eval(mftmp, parent.frame())         
## 4: (function (formula, family = gaussian, data = parent.frame(), 
##        weights, subset, na.action, start = NULL, etastart, mustart,                                                                                                                   
##        offset, control = geese.control(...), method = "glm.fit",                                                                                                                      
##        x = FALSE, y = TRUE, contrasts = NULL, id, waves = NULL,                                                                                                                       
##        zcor = NULL, corstr = "independence", scale.fix = FALSE,                                                                                                                       
##     ...                                                                                                                                                                               
## 3: do.call(regression, cl)                                                                                                                                                            
## 2: cp.formula(log10(pdg) ~ bsplines(day, df = 10), id = id, method = geeglm,                                                                                                          
##        data = spdg, keep_fit = TRUE)                                                                                                                                                  
## 1: cp(log10(pdg) ~ bsplines(day, df = 10), id = id, method = geeglm,                                                                                                                  
##        data = spdg, keep_fit = TRUE)