search for: t_i

Displaying 20 results from an estimated 29 matches for "t_i".

Did you mean: _ti
2005 Jun 10
1
Estimate of baseline hazard in survival
Dear All, I'm having just a little terminology problem, relating the language used in the Hosmer and Lemeshow text on Applied Survival Analysis to that of the help that comes with the survival package. I am trying to back out the values for the baseline hazard, h_o(t_i), for each event time or observation time. Now survfit(fit)$surv gives me the value of the survival function, S(t_i|X_i,B), using mean values of the covariates and the coxph() object provides me with the estimate of the linear predictors, exp(X'B). If S(t_i|X_i,B)=S_o(t_i)^exp(X_iB) is the exp...
2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi, I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is correlated with T. In other words, I would like to generate U from the conditional distribut...
2003 Oct 31
1
constrained nonlinear optimisation in R?
...searched the archives but have not found anything. I need to solve a constrained optimisation problem for a nonlinear function (“maximum entropy formalism”). Specifically, Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities, conditional on a series of constraints of the form: SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are constraints on expectations). Can this be done in R? Bill Shipley Associate Editor, Ecology North American Editor, Annals of Botany Département de biologie, Université de Sherbrooke, Sherbrooke (Québec) J1K 2R1 CANADA Bill.Shipley@U...
2017 Nov 04
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hello Tyler, I rephrase my previous mail, as follows: In your example, T_i = X1:X2:X3. Let F_j = X3. (The numerical variables X1 and X2 are not encoded at all.) Then T_{i(j)} = X1:X2, which in the example is dropped from the model. Hence the X3 in T_i must be encoded by dummy variables, as indeed it is. Arie On Thu, Nov 2, 2017 at 4:11 PM, Tyler <tylermw at gmail....
2017 Nov 06
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...atrix is not consistent with the heuristic. > > Best regards, > Tyler > > On Sat, Nov 4, 2017 at 6:50 AM, Arie ten Cate <arietencate at gmail.com> wrote: >> >> Hello Tyler, >> >> I rephrase my previous mail, as follows: >> >> In your example, T_i = X1:X2:X3. Let F_j = X3. (The numerical >> variables X1 and X2 are not encoded at all.) Then T_{i(j)} = X1:X2, >> which in the example is dropped from the model. Hence the X3 in T_i >> must be encoded by dummy variables, as indeed it is. >> >> Arie >> >>...
2006 Feb 28
1
Collinearity in nls problem
...ves a changepoint; at the beginning, the outcome y is constant, and after a delay, t0, y follows a biexponential decay. I log-transform the data, to stabilize the error variance. At time t < t0, my model is log(y_i)=log(exp(a0)+exp(b0)) at time t >= t0, the model is log(y_i)=log(exp(a0-a1*(t_i - t0))+exp(b0=b1*(t_i - t0))) I thought that I would have identifiability issues, but this model seems to work fine except that the parameters t0 (the delay) is highly correlated with the initial decay slope a0 (which makes sense, as the longer the delay, the more rapid the drop has to be, conditi...
2012 Sep 20
1
Gummy Variable : Doubt
Hi,   I have a system in which I analyze 2 subjects and 1 variable, so I have 2 models as follow:   y ~ x_1[, 1] + x_2[, 1] + x_1[, 2] + x_2[, 2]   Where   x_1[, i] = cos(2 * pi * t / T_i) x_2[, i] = sin(2 * pi * t / T_i)   i = 1, 2   Data have two columns: t and y.   As you can see, I have a multiple components model, with rithm and without trends, and I have a fundamental period (T_1 = 24 hour; T_2 = 12 hour).   I have to compare the parameters between the two models (one...
2000 Oct 26
1
competing risks survival analysis
...A 1000 d B ... c is left censored observation; d is right censored This sort of problem is discussed in Chap 9 of Cox & Oakes Analysis of Survival Data under the name "competing risks". Observations are obtained from n independent individuals in the form (t_i,r_i;s_i) where t_i is the time of the event (failure), r_i is the response type (failure type), and s_i is the stimulus type (explanatory variable). I am wondering if it is possible to use survfit5 to fit parametric and nonparametric models to data like these, and if so how to do it. I read the do...
2017 Nov 02
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
..._{i(j)} has appeared in the formula and by dummy variables if it has not" You find: "However, the example I gave demonstrated that this dummy variable encoding only occurs for the model where the missing term is the numeric-numeric interaction, ~(X1+X2+X3)^3-X1:X2." We have here T_i = X1:X2:X3. Also: F_j = X3 (the only factor). Then T_{i(j)} = X1:X2, which is dropped from the model. Hence the X3 in T_i must be encoded by dummy variables, as indeed it is. Arie On Tue, Oct 31, 2017 at 4:01 PM, Tyler <tylermw at gmail.com> wrote: > Hi Arie, > > Thank you for yo...
2006 Jan 14
1
Different length of objects
Hello, i got an warning message in the following code: f<-1:100 t<-1:100 b<-100 ll2 <- function(b,f,t) { t<-cumsum(t) tn<-t[length(t)] i<-seq(along=f) s1<-(tn*exp(-b*tn)*sum(f[i]))/(1-exp(-b*tn)) s2<-sum((f[i]*(t[i]*exp(-b*t[i])-t[i-1]*exp(b*t[i-1])))/(exp(-b*t[i-1])-exp(-b*t[i]))) s1-s2 } ll2(b,f,t) i think, the problem here is, that t[0] doesn't
2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
...mbda.minus)*Iminusless1*x_new) sum(Iminus_new*Iminusless1)-sum((lambda.minus)*Iminusless1*x_new) } In this codes the variables are Iplus_new, lambda.plus, lambda_minus, Iminus_new , Iminusless1 and Iplusless1. The variables x_new is the duration between two bid-ask occurring at times t_(i-1) and t_i. i.e. x_new=t_i -t_i-1. There are several observations for x_new. The Iplus_new and Iminus_new are the indicator variable showing whether the price was increasing or decreasing at duration x_new. Both Iminusless1 and Iplusless1 are lag variable of Iminus_new and Iplus_new respectively. aaa<...
2017 Nov 04
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...ical and numeric variables, the behavior of model.matrix is not consistent with the heuristic. Best regards, Tyler On Sat, Nov 4, 2017 at 6:50 AM, Arie ten Cate <arietencate at gmail.com> wrote: > Hello Tyler, > > I rephrase my previous mail, as follows: > > In your example, T_i = X1:X2:X3. Let F_j = X3. (The numerical > variables X1 and X2 are not encoded at all.) Then T_{i(j)} = X1:X2, > which in the example is dropped from the model. Hence the X3 in T_i > must be encoded by dummy variables, as indeed it is. > > Arie > > > On Thu, Nov 2, 2017 at...
2017 Nov 06
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...gt; Best regards, > > Tyler > > > > On Sat, Nov 4, 2017 at 6:50 AM, Arie ten Cate <arietencate at gmail.com> > wrote: > >> > >> Hello Tyler, > >> > >> I rephrase my previous mail, as follows: > >> > >> In your example, T_i = X1:X2:X3. Let F_j = X3. (The numerical > >> variables X1 and X2 are not encoded at all.) Then T_{i(j)} = X1:X2, > >> which in the example is dropped from the model. Hence the X3 in T_i > >> must be encoded by dummy variables, as indeed it is. > >> > >>...
2017 Nov 02
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...la and by dummy variables if it has not" > > You find: > "However, the example I gave demonstrated that this dummy variable > encoding only occurs for the model where the missing term is the > numeric-numeric interaction, ~(X1+X2+X3)^3-X1:X2." > > We have here T_i = X1:X2:X3. Also: F_j = X3 (the only factor). Then > T_{i(j)} = X1:X2, which is dropped from the model. Hence the X3 in T_i > must be encoded by dummy variables, as indeed it is. > > Arie > > On Tue, Oct 31, 2017 at 4:01 PM, Tyler <tylermw at gmail.com> wrote: > > Hi...
2010 Sep 29
1
Hashing a set
Dear All, I am given a time series such at, at every time t_i, I am given a set of data (every element of the set is just an integer number). What I need is an injective function able to map every set into a number (possibly an integer number, but that is not engraved in the stone). Does anybody know how to achieve that? Cheers Lorenzo
2017 Oct 27
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hello Tyler, I want to bring to your attention the following document: "What happens if you omit the main effect in a regression model with an interaction?" (https://stats.idre.ucla.edu/stata/faq/what-happens-if-you-omit-the-main-effect-in-a-regression-model-with-an-interaction). This gives a useful review of the problem. Your example is Case 2: a continuous and a categorical regressor.
2017 Oct 31
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...y Amazon at any time, at the very least we have an problem with a lack of documentation. However, I still believe there is a bug when comparing R's implementation to the heuristic described in the book. From Statistical Models in S, page 38-39: "Suppose F_j is any factor included in term T_i. Let T_{i(j)} denote the margin of T_i for factor F_j--that is, the term obtained by dropping F_j from T_i. We say that T_{i(j)} has appeared in the formula if there is some term T_i' for i' < i such that T_i' contains all the factors appearing in T_{i(j)}. The usual case is that T_{...
2017 Jul 28
3
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...= "n", xlim=c(1,5), ylim=c(-10,5), # xlab="Day in ICU", # ylab="CRP (mg/dL)") # CRP98graph <- apply(CRP98, 1, lines, col="gray") par(mfrow=c(1,2)) plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) , xlab="t_i", ylab="y_ij", sub = "lambda = 0.7") CRP7graph <- apply(CRP7, 1, lines, col="gray") plot(c(1:5), CRP98raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5), xlab="Day in ICU", ylab=&q...
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi, everyone, Before everything, thanks. Lots of thanks ;)!!!! I don?t think you understood everything I need to do. I want to write t_i instead of "Day in ICU? [i subscript for t] and y_ij instead of "CRP (mg/dL)? [ij superscript for y]. The label of the axis? :( Can you help me on that task? Thanks!!!!! Best, Rosa Oliveira > On 31 Jul 2017, at 10:28, Martin Maechler <maechler at stat.math.ethz.ch> wrote:...
2017 Jul 31
4
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...; # CRP98graph <- apply(CRP98, 1, lines, >> col="gray") >> > > >> > > par(mfrow=c(1,2)) >> > > >> > > plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), >> ylim=c(-10,5) , > > xlab="t_i", > > ylab="y_ij", > > sub >> = "lambda = 0.7") >> > > >> > > CRP7graph <- apply(CRP7, 1, lines, col="gray") >> > > >> > > >> > > plot(c(1:5), CRP98raw[1,], ty...