File:Funció de densitat dels temps de supervivència dels malalts amb sida de les dades Aids2 de la biblioteca MASS.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 630 × 630 pixels, file size: 48 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
Ænglisc: Density function of the lifetime distribution
Date
Source Own work
Author Pep Roca
SVG development
InfoField
 
The SVG code is valid.
 
This chart was created with R.
 
The file size of this SVG image may be irrationally large because its text has been converted to paths inhibiting translations.
Source code
InfoField

R code

##---------------------------------------------------------
## Funció de densitat de la probabilitat de supervivència
##---------------------------------------------------------
library(MASS)
## Càlcul del temps i variable estat
Aids2$DIES = Aids2$death - Aids2$diag
## Fer la variable muda (factor) ESTAT al final del seguiment
Aids2$ESTAT = as.integer(Aids2$status == "D")
## Selecció dels homosexuals (el valor de la variable ''T.categ'' és "hs") i les dos variables d'interès
AIDS2_HS = subset(Aids2, T.categ=="hs", select = c(DIES, ESTAT))
library(survival)
AIDS2_HS.KM <- survfit(Surv(AIDS2_HS$DIES, AIDS2_HS$ESTAT) ~ 1)
library(grDevices)
svg("mass_aids_hs_densitat.svg")
library(lattice)
densityplot(AIDS2_HS.KM$time, plot.points = F, main="Funció de densitat de la probabilitat de supervivència",
 xlab="Temps (dies des del diagnòstic)", ylab="f(t): Funció de densitat",  xlim=c(0, 2000))
dev.off()

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:48, 16 July 2012Thumbnail for version as of 10:48, 16 July 2012630 × 630 (48 KB)Pep Roca (talk | contribs)

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file: