Displaying 2 results from an estimated 2 matches for "bmiepirevadjcsq".
Did you mean:
bmiepirevadjc
2009 Dec 31
4
Obtaining partial output from a function that does not run to completion.
.... 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+jMEDICAID+H_AGE+jMARSTAT+factor(jED...
2010 Jan 02
1
Help with tryCatch
...d 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 (n<10) {
result<-tryCa...