search for: jeducation

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

Did you mean: education
2009 Dec 31
4
Obtaining partial output from a function that does not run to completion.
...ts 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+jMEDICAID+H_AGE+jMARSTAT+factor(jEDUCATION)+factor(jsmokercat)+factor(jrace)+log(INCOME...
2009 Dec 30
1
glm error: cannot correct step size
...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, : inner loop 1; cannot correct step size # Drop factor(jrace) and model runs wi...
2010 Jan 02
1
Help with tryCatch
...oeffs) < -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 (n<10) { result<-tryCatch(testone(),final=n<-n+1) # Do the function ra...