Loop does not print function output

后端 未结 3 723
情话喂你
情话喂你 2021-01-28 13:39

I\'m trying to make a loop which gives me back the bootstrapped confidence intervals for a regression analysis with one Intercept and three coefficients. Programming the bootstr

3条回答
  •  悲哀的现实
    2021-01-28 13:55

    Automatic printing is turned off inside a loop, just as it is inside a function. You need to explicitly print something if you want to see the output.

    for (i in 2:inputnumberobjects)
    {
       cat(paste("BOOT CONFIDENCE INTERVALS FOR COEFFICIENT ", inputnamesobjects[i], ":\n\n", sep=""))
       print(boot.ci(bootResults, type = "bca", index=i)) ### Result for Coefficients
    }
    

    Hope that helps.

提交回复
热议问题