Suppose you are to simulate a survival data with event time T following an exponential distribution with a mean of 42, and cnesoring time C following an exponential distribution with a mean of 18. For the simulated data, what is the expected percent of censored cases?
Run the code below in R Studio:
set.seed(1001); n = 100000; T = rexp(n , rate = 1/42); C = rexp(n , rate = 1/18); prop = C/T; prop = prop[prop <= 1]; mean(prop)
Output:
Here we used to simulate the percent of censcored cases. Since censoring time should be less than event time, we exclude the cases where T > C and the expected value is estimated as 0.3090527
Suppose you are to simulate a survival data with event time T following an exponential distribution...
The following table contains data from a study on the survival times T (in days) of eighteen patients with lung diseases. Right censored observations are denoted by “+”. Days to death 8 8 26+ 29 69 76+ 77 78+ 79 108 115 122+ 153 154 157+ 180+ 190+ 211+ (a) Estimate the survival function S(t) using the Kaplan-Meier estimator. Compute the standard error of the estimate at each of the uncensored time points. (b) Estimate the median and the 25th-percentile...
Suppose that a given individual in a population has a survival time which is exponential with a hazard rate 0. Each individual's hazard rate θ s potentially different and is sampled from a gamma distribution with density function TCB) Let X be the life length of a randomly chosen member of this popula- tion. (a) Find the survival function of X. (Hint: Find S(x) Ele" .) (b) Find the hazard rate of X. What is the shape of the hazard...
Using R,
Exercise 4 (CLT Simulation) For this exercise we will simulate from the exponential distribution. If a random variable X has an exponential distribution with rate parameter A, the pdf of X can be written for z 2 0 Also recall, (a) This exercise relies heavily on generating random observations. To make this reproducible we will set a seed for the randomization. Alter the following code to make birthday store your birthday in the format yyyymmdd. For example, William...
(al This question asks you to consider a Bayesian approach to inference about λ, the mortality rate in an exponential model for survival time. In order to take a Bayesian . Show that the gamma distribution is a conjugate prior distribution for the distribution is also Gamma, with parameters that depend on a, P, n,y. approach, we specify a prior distribution for A which is gamma distribution exponential model, ie. if we specify that λ~Gamma (α, β) a priori, then...
5. Suppose that the time (in hours) that Isabel spends on an untimed final exam exponential distribution with mean 1.25 hours, and the time that Javier spends follows an exponential distribution with mean 1.75 hours. Assume independent of each other. (a) Determine the probability that Isabel finishes in less than 1 hour ollows an on the same exam that their times are (b) Determine the probability that Javier finishes in less than 1 hour.
5. Suppose that the time (in...
Suppose we are analyzing data from the exponential distribution, which has density function f (y) = ò exp (-5y) for y > 0, depending on a single parameter δ > 0, The exponential distribution arises in reliability theory as the waiting time until failure of a system that is subject to a constant risk of failure δ. (a) Using a computer: plot f(y; δ) as a function of y when δ-1. What is the area under this curve, and why?...
This is a statistic question from survival analysis data Question: The Gompertz distribution is commonly used by biologists who believe that an exponential hazard rate should occur in nature. Suppose that the time to death in months for a mouse exposed to a high dose of radiation follows a Gompertz distribution with 0.01 and 0.25. Find (a) the probability that a randomly chosen mouse will live at least one year, (b) the probability that a randomly chosen mouse will die...
4.2.3. The time to failure T of a microwave oven has an exponential distribution with pdf 1/2 t>0. f)e/2 If three such microwave ovens are chosen and î is the mean of their failure times, find the following: (a) Distribution of T (b) P(T>2)
4.2.3. The time to failure T of a microwave oven has an exponential distribution with pdf 1/2 t>0. f)e/2 If three such microwave ovens are chosen and î is the mean of their failure times, find...
. Suppose the time until failure (in years) of a laptop computer follows an exponential distribution with a mean life of 6 years. a) What is the median life of a laptop computer (in years)? b) What is the probability that a laptop computer will last more than 6 years?
7. Suppose that waiting time, Y, at a particular restaurant follows an Exponential distribution with mean X, where X is a Geometric random variable with mean 1/ p. Find the unconditional mean and variance of Y.