r - How to automate zero-inflated beta regressions reporting results in a table? -


i have matrix 11 columns named "env", 1 response variable bounded between 0 , 1 ("r1") , 10 possible predictors ranging "p1 "p10". use zero-inflated beta regression (r package , function "gamlss") assess individual effect of each predictor on response variable summarizing aic, estimate , probability each predictor in table. table should have predictors rows , model parameters (aic, estimate , probability) columns. process must repeated individually 3 coefficients of beta distribution (mu, nu , sigma).

here subset of data matrix (sorry not being able simulate following guidelines)

p1  p2  p3  p4  p5  p6  p7  p8  p9  p10 r1 600 243.89  2.68    180.32  1753.62 5.15    16.11   46.59   1.52    0.96    0.04 674 259.43  1.49    174.06  1230.71 5.50    19.42   45.65   1.62    0.88    0.28 231 156.19  0.00    151.68  1002.93 5.22    12.76   50.38   1.63    1.00    0.00 624 256.53  8.58    181.32  1194.07 5.35    25.33   58.74   1.33    0.94    0.36 773 346.91  15.59   180.17  1665.10 4.99    26.65   39.74   1.13    0.93    0.21 468 186.84  6.13    172.11  1570.75 5.34    18.72   38.52   1.55    0.97    0.10 340 478.28  14.68   169.06  1685.20 4.81    14.17   112.48  1.65    0.98    0.00 719 401.34  14.57   180.84  1824.18 4.74    13.46   129.70  1.67    0.98    0.00 603 831.58  7.79    158.69  1675.99 5.49    35.08   109.76  1.40    0.62    0.00 355 463.96  3.39    174.65  1987.08 4.26    25.69   85.57   1.56    0.98    0.03 527 560.11  32.18   175.29  2661.40 4.69    50.79   84.67   1.30    0.92    0.14 603 313.94  20.98   163.86  3211.07 4.60    45.15   86.36   1.36    0.93    0.02 508 571.58  40.62   118.69  2842.65 5.11    53.89   57.88   1.31    0.99    0.13 270 191.50  0.35    176.33  3280.57 4.75    51.99   127.10  1.29    0.51    0.12 353 770.72  0.05    173.76  2079.63 5.46    39.12   141.40  1.26    0.51    0.16 166 488.43  12.40   164.20  2692.61 4.55    41.28   107.06  1.40    0.91    0.13 881 316.41  32.43   156.37  2883.55 4.15    29.20   71.32   1.59    0.89    0.21 013 734.83  20.08   156.98  2044.81 4.72    49.62   113.42  1.35    0.98    0.20 526 452.85  33.85   164.58  1795.64 5.01    26.16   87.38   1.54    0.95    0.06 

below syntax gamlss function 3 coefficients:

m1.mu<-gamlss(formula= r1~p1, family=bezi, data=env, method=rs(100)) m1.nu<-gamlss(formula= r1~p1, nu.formula= r1~p1, family=bezi, data=env, method=rs(100))  m1.si<-gamlss(formula= r1~p1,si.formula= r1~p1, family=bezi, data=env, method=rs(100))  

and here structure of table trying get:

    aic.mu  est.mu  prob.mu aic.nu  est.nu  prob.nu aic.si  est.si  prob.si p1                                   p2                                   p3                                    …                                   p10                                  

i assume should able automate combination of "for loop", "lapply" or "apply" , "cbind" unfortunately cannot manage working. great if of guys give me hand. many thanks


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -