Re: [R] RES: survival

2006-03-09 Thread Thomas Lumley
On Wed, 8 Mar 2006, Paulo Brando wrote:
>
>>  summary(model.fit) # just one species from one treatment shown below
>
> Call: survfit(formula = Surv(time, censo) ~ treatment + species, data =
> wsuv)
>
>treatment=0, species=1
> time n.risk n.event survival std.err lower 95% CI upper 95% CI
>1  15440 3860.975 0.001260.9730.977
>2  15054 3360.953 0.001700.9500.957
>3  14668 3020.934 0.002000.9300.938
>4  14282 2960.914 0.002260.9100.919
>5  13896 2810.896 0.002470.8910.901
>6  13510 2640.878 0.002640.8730.883
>7  13124 2510.861 0.002800.8560.867
>8  12738 2320.846 0.002930.8400.852
>9  12352 2160.831 0.003050.8250.837
>   10  11966 2060.817 0.003150.8110.823
>   11  11580 1900.803 0.003250.7970.810
>   12  11194 1790.790 0.003330.7840.797
>   13  10808 1670.778 0.003410.7720.785
>   14  10422 1670.766 0.003490.7590.773
>   15  10036 1450.755 0.003560.7480.762
>   16   9650 1420.744 0.003630.7370.751
>   17   9264 1350.733 0.003690.7260.740
>   18   8878 1220.723 0.003750.7150.730
>   19   8492  990.714 0.003800.7070.722
>   20   8106  840.707 0.003850.6990.714
>   21   7720  680.701 0.003890.6930.708
>   22   7334  660.694 0.003930.6870.702
>   23   6948  510.689 0.003970.6810.697
>   24   6562  400.685 0.004000.6770.693
>   25   6176  380.681 0.004030.6730.689
>   26   5790  370.676 0.004070.6690.684
>   27   5404  330.672 0.004110.6640.680
>   28   5018  310.668 0.004150.6600.676
>   29   4632  260.664 0.004190.6560.673
>   30   4246  220.661 0.004230.6530.669
>   31   3860  150.658 0.004270.6500.667
>   32   3474  140.656 0.004310.6470.664
>   33   3088  140.653 0.004360.6440.661
>   34   2702  130.650 0.004430.6410.658
>   35   2316  120.646 0.004510.6380.655
>   36   1930  110.643 0.004620.6340.652
>   37   1544  120.638 0.004800.6280.647
>   38   1158  100.632 0.005070.6220.642
>   39772   90.625 0.005570.6140.636
>   40386   80.612 0.007090.5980.626
>
> I don't get why with 8 leaves remaining (out of 384), the survival is
> about 0.6???
>

It looks as though the majority of your leaves are censored, especially at 
later time points. At each of your 40 time points about 1-2% of the leaves 
under observation die, so the survival curve should end up somewhere 
between 0.98^40 =0.45 and 0.99^40=0.67, and it does.

-thomas

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] RES: survival

2006-03-08 Thread Paulo Brando
Dear Thomas,

The head of my dataset

> head(wsuv)
  parcel  sp time censo treatment
species
1 S8 Poecilanthe effusa ( Hub. ) Ducke. 1   1   1  1
2 S8 Poecilanthe effusa ( Hub. ) Ducke. 1   1   1  1
3 S8 Poecilanthe effusa ( Hub. ) Ducke. 1   1   1  1
4 S8 Poecilanthe effusa ( Hub. ) Ducke. 1   1   1  1
5 S8 Poecilanthe effusa ( Hub. ) Ducke. 1   1   1  1
6 S8 Poecilanthe effusa ( Hub. ) Ducke. 1   1   1  1
...
144361

>  summary(model.fit) # just one species from one treatment shown below

Call: survfit(formula = Surv(time, censo) ~ treatment + species, data =
wsuv)

treatment=0, species=1 
 time n.risk n.event survival std.err lower 95% CI upper 95% CI
1  15440 3860.975 0.001260.9730.977
2  15054 3360.953 0.001700.9500.957
3  14668 3020.934 0.002000.9300.938
4  14282 2960.914 0.002260.9100.919
5  13896 2810.896 0.002470.8910.901
6  13510 2640.878 0.002640.8730.883
7  13124 2510.861 0.002800.8560.867
8  12738 2320.846 0.002930.8400.852
9  12352 2160.831 0.003050.8250.837
   10  11966 2060.817 0.003150.8110.823
   11  11580 1900.803 0.003250.7970.810
   12  11194 1790.790 0.003330.7840.797
   13  10808 1670.778 0.003410.7720.785
   14  10422 1670.766 0.003490.7590.773
   15  10036 1450.755 0.003560.7480.762
   16   9650 1420.744 0.003630.7370.751
   17   9264 1350.733 0.003690.7260.740
   18   8878 1220.723 0.003750.7150.730
   19   8492  990.714 0.003800.7070.722
   20   8106  840.707 0.003850.6990.714
   21   7720  680.701 0.003890.6930.708
   22   7334  660.694 0.003930.6870.702
   23   6948  510.689 0.003970.6810.697
   24   6562  400.685 0.004000.6770.693
   25   6176  380.681 0.004030.6730.689
   26   5790  370.676 0.004070.6690.684
   27   5404  330.672 0.004110.6640.680
   28   5018  310.668 0.004150.6600.676
   29   4632  260.664 0.004190.6560.673
   30   4246  220.661 0.004230.6530.669
   31   3860  150.658 0.004270.6500.667
   32   3474  140.656 0.004310.6470.664
   33   3088  140.653 0.004360.6440.661
   34   2702  130.650 0.004430.6410.658
   35   2316  120.646 0.004510.6380.655
   36   1930  110.643 0.004620.6340.652
   37   1544  120.638 0.004800.6280.647
   38   1158  100.632 0.005070.6220.642
   39772   90.625 0.005570.6140.636
   40386   80.612 0.007090.5980.626

I don't get why with 8 leaves remaining (out of 384), the survival is
about 0.6???


Call: survfit(formula = Surv(time, censo) ~ 1, data = wsuv)

  n  events  median 0.95LCL 0.95UCL 
 144361   58830  40  39  40

 
> survfit(Surv(timee,ind)~sp2,data=wsuv)
Call: survfit(formula = Surv(timee, ind) ~ sp2, data = wsuv)

  n events median 0.95LCL 0.95UCL
sp2=1 32226  10856Inf Inf Inf
sp2=2 23370   9824 38  37  39
sp2=3 31201  13275 40  39  41
sp2=4 28044  10401 41  40  41
sp2=5 29520  14474 31  30  31


> survfit(Surv(timee,ind)~parcel2,data=wsuv)
Call: survfit(formula = Surv(timee, ind) ~ parcel2, data = wsuv)

  n events median 0.95LCL 0.95UCL
parcel2=0 68183  28116 38  38  38
parcel2=1 76178  30714 41  41  41


> survfit(Surv(timee,ind)~interaction(parcel2,sp2),data=wsuv)
Call: survfit(formula = Surv(timee, ind) ~ interaction(parcel2, sp2), 
data = wsuv)

  n events median 0.95LCL 0.95UCL
interaction(parcel2, sp2)=0.1 15826   5070Inf Inf Inf
interaction(parcel2, sp2)=1.1 16400   5786Inf Inf Inf
interaction(parcel2, sp2)=0.2  9430   3935 38  37  39
interaction(parcel2, sp2)=1.2 13940   5889 38  37  39
interaction(parcel2, sp2)=0.3 14678   6021 40  39  41
interaction(parcel2, sp2)=1.3 16523   7254 39  37  41
interaction(parcel2, sp2)=0.4 14473   5758 38  37  39
interaction(parcel2, sp2)=1.4 13571   4643Inf Inf Inf
interaction(parcel2, sp2)=0.5 13776   7332 2