[R] Printing

Steven Yen @tyen @end|ng |rom ntu@edu@tw
Sun Aug 11 10:51:00 CEST 2024


Hi

In the following codes, I had to choose between printing (= TRUE) or 
deliver something for grab (ei, vi). Is there a way to get both--that 
is, to print and also have ei and vi for grab? Thanks.

Steven

...

out<-round(as.data.frame(cbind(ap,se,t,p)),digits)
out<-cbind(out,sig)
out<-out[!grepl(colnames(zx)[1],rownames(out)),]
if(printing){
cat("\nAPPs of bivariate ordered probit probabilities",
     "\nWritten by Steven T. Yen (Last update: 08.11.24)",
     "\ny1.level=",     y1.level,
     "  y2.level=",     y2.level,
     "\njoint12 =",     joint12,
     "\nmarg1 =",       marg1,
     "\nmarg2 =",       marg2,
     "\ncond12 =",      cond12,
     "\ncond21 =",      cond21,
     "\nCovariance matrix:",vb.method,
     "\nWeighted =",        weighted,
     "\nAt means =",        mean,
     "\nProb x 100 =",      times100,
     "\ntesting ="      ,   testing,
     "\nuse_bb_and_vbb = ",use_bb_and_vbb,
     "\nsample size =",     length(y1),"\n")
if (!resampling) cat("\nSEs by delta method","\n")
if  (resampling) cat("\nSEs K-R resampling with",ndraws,"draws\n")
return(out)
} else {
invisible(list("ei"=ap,"vi"=vap))



More information about the R-help mailing list