search for: dyba

Displaying 1 result from an estimated 1 matches for "dyba".

Did you mean: dba
2011 Feb 15
0
Delta method using numerical derivatives
...uld like something akin to the following predictnl() function: ## get some data and fit a model require(Epi) data(lungDK) fit <- glm(D/Y ~ as.factor(A5)+as.factor(A5):P5-1, data=lungDK, subset=(P5>=1970), weight=Y, family=poisson("identity")) # (Hakulinen and Dyba) ## calculate some summary statistics (e.g. cumulative incidence to 85 years) require(plyr) cuminc <- function(object,year=P5,newdata=NULL) ddply(newdata,deparse(substitute(year)),function(data) sum(5*predict(object,newdata=data)))[,-1,drop=TRUE] ## Now: get summary statistics and SEs...