boot_loglogistic: Parametric Bootstrap of time-to-event data following a...

Description Usage Arguments Value Examples

View source: R/boot_loglogistic.R

Description

Function generating bootstrap data according to a loglogistic distribution (specified by a model parameter θ), assuming exponentially distributed right-censoring (specified by a rate C). After data generation again a model is fitted and evaluated at a pre-specified time point t_0 yielding the response vector.

Usage

1
boot_loglogistic(t0, B = 1000, theta, C, N)

Arguments

t0

time point of interest

B

number of bootstrap repetitions. The default is B=1000

theta

parameter of the loglogistic distribution, theta=(shape,scale)

C

rate of the exponential distribution specifiying the censoring

N

size of the dataset = number of observations

Value

A vector of length B containing the estimated survival at t0

Examples

1
2
3
4
5
alpha<-0.05
t0<-2
N<-30
C<-1
boot_loglogistic(t0=t0,theta=c(1,3),C=C,N=N)

Example output

Loading required package: survival
Loading required package: eha
   [1] 0.6532019 0.6561658 0.6435739 0.6199975 0.6582627 0.5865267 0.6158997
   [8] 0.8871300 0.3987636 0.6897434 0.5992924 0.5386667 0.6346226 0.4961818
  [15] 0.7728360 0.6818705 0.8546937 0.7096165 0.8454712 0.4610207 0.6706572
  [22] 0.7355055 0.4723057 0.8709076 0.6656695 0.5415853 0.6821935 0.5080985
  [29] 0.6440643 0.5230176 0.6344552 0.5766096 0.6488826 0.6723968 0.8028156
  [36] 0.4444562 0.7478402 0.6870906 0.5272617 0.3796253 0.3130928 0.6289971
  [43] 0.7513897 0.4640421 0.5758524 0.5461867 0.7063668 0.6923812 0.5612491
  [50] 0.7388870 1.0000000 0.5419071 0.6253897 0.5080489 0.3511095 0.5934178
  [57] 0.3831960 0.6865233 0.8788780 0.6196146 0.5979921 0.8858073 0.4495224
  [64] 0.7857155 0.5825943 0.5793507 0.6587672 0.7320078 0.5852296 0.6778190
  [71] 0.2991650 0.6951118 0.5758678 0.7073098 0.5422577 0.6169501 0.5421444
  [78] 0.8565042 0.7995453 0.8467462 0.6453037 0.6058285 0.3820076 0.6420069
  [85] 0.4764638 0.7038476 0.7008710 0.4778716 0.6265007 0.3183267 0.7703199
  [92] 0.5105305 0.4247185 0.3238213 0.5567801 0.6948532 0.4880498 0.7005291
  [99] 0.7214346 0.7733870 0.5732117 0.5772958 0.5265445 0.5476470 0.6723031
 [106] 0.8032931 0.6265584 0.5661652 0.6112291 0.6837209 0.4583425 0.7165592
 [113] 0.4707338 0.8373100 0.6199143 0.5451960 0.7005753 0.7722468 0.5663446
 [120] 0.7580862 0.7484391 0.4401054 0.6179471 0.2768520 0.6375622 0.6436856
 [127] 0.4758547 0.5658158 0.5271244 0.8306758 0.3437852 0.3834796 0.4689774
 [134] 0.4572155 0.8523731 0.5286942 0.7702046 0.7402023 0.6864600 0.4271012
 [141] 0.5344872 0.8854445 0.4698230 0.5906657 0.6317947 0.4206081 0.6697918
 [148] 0.6355737 0.4666130 0.6034477 0.5478010 0.7416461 0.4550474 0.3453553
 [155] 0.5411659 0.5766568 0.8157289 0.6738385 0.3536927 0.6548261 0.3633908
 [162] 0.6101979 0.2041481 0.3090330 0.4606587 0.3149948 0.5047657 0.6893512
 [169] 0.5031281 0.8383970 0.7149001 0.3740199 0.6557898 0.4365028 0.5235701
 [176] 0.4428624 0.6451526 0.7842152 0.5444500 0.6218921 0.5535096 0.5580494
 [183] 0.6267542 0.6282660 0.4357956 0.8035981 0.2563929 0.6177422 0.7120819
 [190] 0.6356204 0.5647207 0.4715160 0.3889708 0.6823569 0.8302392 0.7961740
 [197] 0.6705078 0.3708726 0.5754706 0.7605026 0.7137845 0.3345257 0.6028957
 [204] 0.5820470 0.6718330 0.6297456 0.5312728 0.5888548 0.6190748 0.5366137
 [211] 0.5394911 0.5911007 0.5057302 0.2995963 0.4392927 0.6015992 0.7615780
 [218] 0.4511313 0.4780490 0.5106134 0.4388960 0.5951640 0.6507649 0.4061500
 [225] 0.6365026 0.5125175 0.6460962 0.4894209 0.6391446 0.5485416 0.4216981
 [232] 0.6286210 0.7079018 0.6823289 0.6793482 0.6351492 0.4741832 0.2941781
 [239] 0.5597252 0.8611071 0.6681322 0.5126789 0.4558424 0.3654713 0.3008134
 [246] 0.5633309 0.3856285 0.7046808 0.4976915 0.6934519 0.5837230 0.5085208
 [253] 0.7761919 0.6018263 0.6759545 0.6835588 0.7817259 0.7096706 0.7348449
 [260] 0.5770927 0.6373843 0.4774286 0.4166797 0.6889377 0.4018337 0.5020146
 [267] 0.3540971 0.7075684 0.5189127 0.6210819 0.5430326 0.6091311 0.4887618
 [274] 0.4994842 0.6558638 0.4267251 0.7162356 0.5466429 0.6288141 0.6853217
 [281] 0.5477945 0.8245220 0.6104078 0.4297214 0.6748677 0.6796180 0.3930225
 [288] 0.6032468 0.3942644 0.6582304 0.5010489 0.6509809 0.5486440 0.3844283
 [295] 0.5316745 0.8094499 0.4681231 0.6414020 0.5687051 0.8967148 0.5245507
 [302] 0.6230404 0.6638338 0.5827622 0.7353215 0.2621308 0.7151406 0.6971521
 [309] 0.5019492 0.5487073 0.6407343 0.6544626 0.3215565 0.5803655 0.6010881
 [316] 0.4356077 0.6320564 0.6301680 0.6159233 0.5870806 0.6744670 0.9559971
 [323] 0.5943211 0.4959603 0.4427741 0.6024270 0.5443165 0.7780565 0.4644958
 [330] 0.5260035 0.4873442 0.4058454 0.6362005 0.6268982 0.4029737 0.5574048
 [337] 0.5462303 0.5724305 0.3824062 0.5528043 0.4899533 0.5592413 0.3599231
 [344] 0.6359677 0.5944275 0.3215163 0.7982831 0.5658963 0.5736811 0.5889093
 [351] 0.5295734 0.8299968 0.5573661 0.5422659 0.4518170 0.6288549 0.5997439
 [358] 0.6934627 0.5521589 0.4892386 0.6134289 0.6966295 0.5844684 0.6019129
 [365] 0.3937177 0.4844683 0.4568901 0.2857378 0.5006787 0.7000039 0.6128202
 [372] 0.7135786 0.5811742 0.6355631 0.6214604 0.3967685 0.5374821 0.8040723
 [379] 0.5141529 0.7954926 0.4246944 0.4080150 0.4515824 0.4437880 0.3413763
 [386] 0.5233871 0.2915840 0.6169561 0.5013358 0.5857721 0.6042203 0.4825180
 [393] 0.6529721 0.4109422 0.6672461 0.7473591 0.7444542 0.3124958 0.5035825
 [400] 0.5624768 0.6005980 0.4916176 0.5191164 0.5122643 0.5842924 0.6807985
 [407] 0.4025242 0.5607286 0.4829150 0.7887051 0.6096916 0.7695357 0.4645250
 [414] 0.6774546 0.5830656 0.4641634 0.8443128 0.4286132 0.7039111 0.7997336
 [421] 0.5627677 0.6442084 0.5209693 0.4945884 0.5514388 0.7069001 0.4396493
 [428] 0.5238373 0.6357755 0.5608288 0.4757002 0.5839423 0.6103828 0.8411183
 [435] 0.4998329 0.5963334 0.5855757 0.9104242 0.2453599 0.5890907 0.5459782
 [442] 0.3767805 0.4920763 0.4759746 0.7429059 0.6518821 0.5957360 0.5337832
 [449] 0.6361188 0.6671615 0.5219880 0.4312773 0.6478091 0.6086804 0.6393652
 [456] 0.4251751 0.6168378 0.4917473 0.5370289 0.4951856 0.5901484 0.8156880
 [463] 0.5222516 0.5406399 0.4875153 0.6759957 0.7360494 0.5502072 0.3688589
 [470] 0.4194864 0.5664320 0.4552337 0.5769369 0.4033639 0.4215377 0.3898848
 [477] 0.6362484 0.4403592 0.7379486 0.6863101 0.6244739 0.5855930 0.6367394
 [484] 0.6141916 0.6468628 0.4545836 0.4727596 0.5213710 0.6553702 0.5772306
 [491] 0.6470679 0.4138697 0.5947017 0.6056799 0.8463618 0.5745741 0.6512008
 [498] 0.5199416 0.6967171 0.3559181 0.5168632 0.5407244 0.5897580 0.6465957
 [505] 0.5787700 0.4114363 0.3583111 0.6643619 0.4917932 0.5747933 0.6358669
 [512] 0.6763887 0.4984355 0.5524396 0.6600823 0.4436552 0.7933552 0.3406433
 [519] 0.6935552 0.4857117 0.4288738 0.4845825 0.3499416 0.5155454 0.7002632
 [526] 0.7745500 0.5301100 0.8253343 0.5988109 0.4445795 0.6190761 0.7041813
 [533] 0.6980779 0.6345702 0.6232747 0.4811464 0.4385333 0.5920047 0.5259747
 [540] 0.4872148 0.5174056 0.5365564 0.3200384 0.6831754 0.5803178 0.5937175
 [547] 0.5925298 0.6590946 0.7460945 0.7666104 0.7473126 0.4353919 0.7150927
 [554] 0.7652330 0.5522848 0.6406169 0.5030782 0.6877918 0.5867419 0.6512174
 [561] 0.4445029 0.4703806 0.7476823 0.6431545 0.3767117 0.7348126 0.4928198
 [568] 0.5304945 0.5947818 0.6090452 0.5606339 0.7327757 0.3307643 0.7130183
 [575] 0.6525476 0.5455301 0.3775606 0.4070346 0.3869186 0.5872674 0.4990153
 [582] 0.7194892 0.5997794 0.5280307 0.5915330 0.3815143 0.5402647 0.5224836
 [589] 0.5331201 0.6826382 0.7324797 0.4633961 0.6765989 0.6007131 0.6768328
 [596] 0.4990397 0.7311663 0.6510606 0.7592913 0.7935105 0.6775632 0.6986213
 [603] 0.3905439 0.9317495 0.3993870 0.5012842 0.7393583 0.5745303 0.6274380
 [610] 0.5931108 0.7116461 0.5715734 0.5257995 0.6563045 0.6198017 0.5202404
 [617] 0.5604699 0.6892545 0.3888133 0.5820254 0.5897006 0.6927500 0.7482643
 [624] 0.5258141 0.2950036 0.4056896 0.8243109 0.3058280 0.6300219 0.4240822
 [631] 0.6582057 0.5021114 0.5794400 0.6772188 0.8219484 0.5152355 0.7031011
 [638] 0.4828264 0.4529064 0.3268724 0.5704143 0.3861520 0.4952780 0.6200438
 [645] 0.7889655 0.3280599 0.5719018 0.5399814 0.6511169 0.6613970 0.7064939
 [652] 0.6250214 0.5669648 0.7434736 0.3565364 0.4753283 0.3515610 0.4337866
 [659] 0.7661607 0.5922399 0.8818585 0.4775376 0.6953930 0.7173169 0.5824643
 [666] 0.6543809 0.5899926 0.6827103 0.6903098 0.7113582 0.5650425 0.6186573
 [673] 0.5689687 0.7002582 0.6994050 0.5548596 0.6887358 0.3460166 0.5598988
 [680] 0.7470418 0.4132758 0.6578672 0.7265487 0.8197056 0.7844332 0.6034653
 [687] 0.6313861 0.5395890 0.5063660 0.5330081 0.7694126 0.7517120 0.8101864
 [694] 0.4469661 0.5604598 0.5643374 0.4458420 0.1741406 0.6945697 0.4341912
 [701] 0.6651214 0.4971919 0.5252290 0.5203158 0.6547313 0.5224522 0.7335543
 [708] 0.5014727 0.7023891 0.4475046 0.4865316 0.8475541 0.5343426 0.4776813
 [715] 0.4271828 0.6232522 0.3642440 0.6737670 0.6061668 0.5468134 0.6644418
 [722] 0.6084929 0.7733473 0.6873355 1.0000000 0.4339275 0.7644604 0.4159919
 [729] 0.4876139 0.6125061 0.7636921 0.7895426 0.8588469 0.3933292 0.3410323
 [736] 0.5245724 0.5034686 0.6407647 0.6529460 0.5476035 0.8001353 0.6267224
 [743] 0.6295268 0.4470005 0.6128799 0.4320254 0.5705424 0.5200825 0.6507813
 [750] 0.7381648 0.4283760 0.3793354 0.8193450 0.4922942 0.7040092 0.5062344
 [757] 0.7182761 0.7025546 0.5972522 0.5919456 0.6190303 0.6180720 0.4499022
 [764] 0.7611250 0.6443227 0.5292873 0.3617438 0.5373749 0.6095055 0.5472195
 [771] 0.5247825 0.5265814 0.3484674 0.6458919 0.5778827 0.6492826 0.4922324
 [778] 0.6228399 0.7474113 0.5193466 0.7510277 0.5072586 0.4432747 0.6030415
 [785] 0.7551147 0.5095375 0.2869898 0.5512835 0.6962598 0.5650922 0.4513986
 [792] 0.5264300 0.8149739 0.5646121 0.6792356 0.4236084 0.3957282 0.7449306
 [799] 0.6208435 0.4477538 0.5124563 0.4378767 0.7757865 0.7091399 0.7246531
 [806] 0.6202996 0.5692032 0.6906686 0.4985058 0.5694866 0.4483063 0.4992629
 [813] 0.6912984 0.7585270 0.4311610 0.6977912 0.5972743 0.6652030 0.6513012
 [820] 0.5603923 0.6181080 0.4986582 0.7291598 0.4317319 0.5238489 0.2309049
 [827] 0.6829106 0.4859791 0.6922922 0.5899850 0.5526785 0.6390130 0.5533554
 [834] 0.4145016 0.5341461 0.7740408 0.6442547 0.7738083 0.6235587 0.7728336
 [841] 0.7038189 0.6846854 0.5492031 0.6519877 0.5078359 0.3637618 0.7412337
 [848] 0.5622658 0.7932386 0.4897893 0.7741754 0.8559423 0.5972893 0.5139784
 [855] 0.6720108 0.7402249 0.5883823 0.5247321 0.4690279 0.6873106 0.4501633
 [862] 0.4687174 0.4482562 0.4322340 0.3446258 0.6402869 0.6789684 0.6167182
 [869] 0.5454857 0.7820024 0.4904708 0.6376857 0.5301484 0.6458954 0.6511851
 [876] 0.5945162 0.5065473 0.7477178 0.6007842 0.5166563 0.5029811 0.3691305
 [883] 0.5586919 0.6618365 0.7309922 0.4227735 0.4090301 0.5929792 0.6671953
 [890] 0.6526258 0.4581958 0.8344356 0.6683406 0.6995049 0.5992188 0.4576492
 [897] 0.4707937 0.6808497 0.2805483 0.5363629 0.7051608 0.6124511 0.3835239
 [904] 0.6293849 0.6863543 0.7869989 0.7110906 0.6013644 0.4280143 0.5412557
 [911] 0.7914093 0.5550769 0.3744849 0.2811700 0.4440707 0.6979189 0.7049068
 [918] 0.6627299 0.6525280 0.7080733 0.5893463 0.4697598 0.5804780 0.4410307
 [925] 0.6177330 0.4467116 0.5213307 0.6242100 0.2716594 0.7162174 0.6522581
 [932] 0.4166773 0.5067495 0.6020050 0.5601268 0.6760788 0.7736841 0.6092720
 [939] 0.5744785 0.7211284 0.7415132 0.6302650 0.4942750 0.7607369 0.7678893
 [946] 0.6904580 0.3170250 0.4969654 0.8135323 0.5659832 0.7604880 0.6828975
 [953] 0.6757326 0.6098899 0.7418077 0.6273856 0.5050315 0.5484976 0.6446295
 [960] 0.4850282 0.5383136 0.6812429 0.4506241 0.5065598 0.7621866 0.5681861
 [967] 0.7182234 0.7503839 0.6697411 0.7221780 0.4363096 0.5776137 0.2801318
 [974] 0.7509977 0.7853778 0.6860255 0.7084348 0.7059894 0.5142946 0.3635945
 [981] 0.4658671 0.6440665 0.7597273 0.6113718 0.5138496 0.5088254 0.4040391
 [988] 0.5843185 0.7346772 0.5652896 0.7050024 0.5462175 0.6032369 0.7433913
 [995] 0.7194285 0.7121037 0.5836591 0.5950295 0.5499130 0.5971574
Warning messages:
1: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
  Ran out of iterations and did not converge
2: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
  Ran out of iterations and did not converge

EquiSurv documentation built on Oct. 23, 2020, 6:43 p.m.