search for: aamtcar

Displaying 3 results from an estimated 3 matches for "aamtcar".

Did you mean: aamtcare
2009 Dec 31
4
Obtaining partial output from a function that does not run to completion.
...vif() have any problems . How can I force the function to print sequential results rather than wait for the entire function to complete before listing the functhion's output? Thanks, John minBMI<-function(SS,SimData) { SampleData<-sample(1:SS,size=SS,replace=TRUE) fitBMIEpiRevlm<-lm(AAMTCARE~BMIEpiRevAdjc+BMIEpiRevAdjcSq+SEX+jPHI+jMEDICAID+H_AGE+jMARSTAT+factor(jEDUCATION)+factor(jsmokercat)+factor(jrace)+log(INCOME_C+1),data=SimData[SampleData,],x=TRUE) print(summary(fitBMIEpiRevlm)) print(vif(fitBMIEpiRevlm)) fitBMIEpiRev<- glm(AAMTCARE~BMIEpiRevAdjc+BMIEpiRevAdjcSq+SEX+jPHI+jMED...
2009 Dec 30
1
glm error: cannot correct step size
...ge that I don't understand when I try to run GLM. The error only occurs when I have all independent variables in the model. When I drop one independent variable, the model runs fine. Can anyone help me understand what the error means and how I can correct it? Thank you, John > fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+jPHI+jMEDICAID+factor(AgeCat)+ + factor(jINDINC)+jMARSTAT+jEDUCATION+factor(jsmokercat)+factor(jrace),data=SimData,family=Gamma(link="log")) Warning: step size truncated due to divergence Error in glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart,...
2010 Jan 02
1
Help with tryCatch
...# Define matrix to hold results coeffs <- matrix(nrow=10, ncol=3) dimnames(coeffs) < -list(NULL,c("BMI","BMIsq","min")) # set row counter n<-0 # Function to run testone<-function() { SampleData<-sample(1:SS,size=SS,replace=TRUE) result<-summary(glm(AAMTCARE~BMIEpiRevAdjc+BMIEpiRevAdjcSq+SEX+jPHI+jMEDICAID+H_AGE+jMARSTAT+factor(jEDUCATION)+factor(jsmokercat)+factor(jrace)+log(INCOME_C+1),data=SimData[SampleData,],family=Gamma(link="log"))) } # if function ran correctly, increment row counter by one and store results # Do this 10 times while...