Hi all!
I've a question for which I have found no answer. I want to create a function that contains the glm function as a kind of subfunction within the larger function. I want to be able to  chose how many predictor variables will be included in the glm function based on the "larger" function. Example:
function(ab#=dataset#,case#response variable#, exp#exposure variable#, confounders#list of confounder variables#){
Glmf<-glm(case~exp + confounders, family=binomial(link="logit"), data=inter, na.action=na.fail)
summary(Glmf)
return(summary(Glmf))
}
I want to be able to put in different numbers of confounding variables. I would be very GRATEFUL for suggestions how to solve the problem.
Best Regards Henrik Källberg
henrik.kallberg@ki.se


	[[alternative HTML version deleted]]

