search for: b_i

Displaying 20 results from an estimated 41 matches for "b_i".

Did you mean: _i
2009 Nov 07
0
solution design for a large scale (> 50G) R computing problem
...and memory issues need to be seriously considered. Below is the problem description and my tentative approach. I would appreciate if any one can share thoughts on how to solve this problem more efficiently. I have 1001 multidimensional arrays -- A, B1, ..., B1000. A takes about 500MB in memory and B_i takes 100MB. I need to run an experiment that evaluates a function f(A, B_i) for all B_i. f(A, B_i) doesn't change A, B_i during its evaluation. These evaluations are independent for all i. I also need to design various evaluation functions. Thus these kind of experiments need to be performed o...
2012 Oct 18
7
summation coding
I would like to code the following in R: a1(b1+b2+b3) + a2(b1+b3+b4) + a3(b1+b2+b4) + a4(b1+b2+b3) or in summation notation: sum_{i=1, j\neq i}^{4} a_i * b_i I realise this is the same as: sum_{i=1, j=1}^{4} a_i * b_i - sum_{i=j} a_i * b_i would appreciate some help. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/summation-coding-tp4646678.html Sent from the R help mailing list archive at Nabble.com.
2009 Aug 06
1
solving system of equations involving non-linearities
Hi, I would appreciate if someone could help me on track with this problem. I want to compute some parameters from a system of equations given a number of sample observations. The system looks like this: sum_i( A+b_i>0 & A+b_i>C+d_i) = x sum_i( C+d_i>0 & C+d_i>A+b_i) = y sum_i( exp(E+f_i) * ( A+b_i>0 & A+b_i>C+d_i) = z A, C, E are free variables while the other letters represent values given from sample observations. The equations involve counts of the number of fulfilled conditio...
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
Dear all, Given a LME model (following the notation of Pinheiro and Bates 2000) y_i = X_i*beta + Z_i*b_i + e_i, is it possible to extract the variance-covariance matrix for the estimated beta_i hat and b_i hat from the lme fitted object? The reason for needing this is because I want to have interval prediction on the predicted values (at level = 0:1). The "predict.lme" seems to provide poin...
2008 May 16
1
Making slope coefficients ``relative to 0''.
...rested in whether the slopes in a linear model are different from 0. I.e. I would like to obtain the slope estimates, and their standard errors, ``relative to 0'' for each group, rather than relative to some baseline. Explicitly I would like to write/represent the model as y = a_i + b_i*x + E i = 1, ..., K, where x is a continuous variate and i indexes groups (levels of a factor with K levels). The ``usual'' structure (using ``treatment contrasts'') gives y = a + a_i + b*x + b_i*x + E i = 2, ..., K. (So that b is the slope for the baseline group, and b_i me...
2005 Nov 16
6
nlme question
I am using the package nlme to fit a simple random effects (variance components model) with 3 parameters: overall mean (fixed effect), between subject variance (random) and within subject variance (random). I have 16 subjects with 1-4 obs per subject. I need a 3x3 variance-covariance matrix that includes all 3 parameters in order to compute the variance of a specific linear
2011 Jan 29
1
Spare matrix multiplication
Dear R, I have a simple question concerning with a special case of spare matrix multiplications. Say A is a 200-by-10000 dense matrix. B is a 10000-by-10000 block- diagonal matrix, and each diagonal block B_i is 100-by-100. The usual way I did A%*%B will take about 30 seconds which is to time consuming because I have to do this thousands of times. I also tried to partition A into 100 small blocks and use mapply function to multiply by each B_i, but that is even slower. I am wondering if there is an eff...
2013 Jul 02
0
Optimización MINLP
Muy buenas, Tengo la siguiente duda/problema, He optimizado con éxito un problema de este tipo: \sum f(x_i) donde f es una curva exponencial (función no lineal) sujeto a: a_i < x_i < b_i y \sum f(x_i) < Presupuesto Vamos, es repartir un presupuesto forzando a que inviertas como poco a_i y como mucho b_i para cada i Esto lo hecho correctamente usando el paquete: http://cran.r-project.org/web/packages/nloptr/index.html Uso un algoritmo que no necesita gradiente: NLOPT_LN_COBYL...
2003 Jun 19
2
Fitting particular repeated measures model with lme()
...; applies to only one year. One can think of the first score on the student as a score from a prior year (for which I have no teacher links), and the second score is from the current year and is linked to the teacher. The model for student j in class i is: Y_{ij0} = a_0 + e_{ij0} Y_{ij1} = a_1 + b_i + e_{ij1} with Var(b_i) the teacher variance component and Cov(e_{ij0},e_{ij1}) unstructured. That is, if the data are organized by student, the "Z" matrix in the usual linear mixed model notation has every other row equal to a row of zeros. I am wondering whether there is some way to...
2000 Mar 31
2
linear models
.... fits a random effect intercept term. The reason why I want to do this is test for the significance of the random effect intercept term. anova( , ) does not work for an lm model and lme model together. 2) Is there some nice way of handling linear models which are of the form response_ij = a_i + b_i x_ij + \epsilon_ij where a_i and b_i are fixed effects, x_ij is given (continuous) data, \epsilon_ij ~ N(0, \sigma^2), and the i's range over some group? This is basically a group of regression models, but I want them handled as one unit for the purposes of estimation of \sigma^2 etc. I know...
2008 Jul 31
1
clustering and data-mining...
Hi all, I am doing some experiment studies... It seems to me that with different combination of 5 parameters, the end results ultimately converged to two scalars. That's to say, some combinations of the 5 parameters lead to one end result and some other combinations of the 5 parameters lead to the other end result (scalar). I am thinking of this is sort of something like clustering or
2006 Oct 22
1
Multilevel model ("lme") question
...7150 Intra-subject trajectories of Y very close to linear. I'd like to check whether slope (and maybe also offset) of this line are (in part) predicted by X.baseline. Thus, I think the multilevel model specification should be as follows (i = subject, j=measurement): y_ij = \beta_i + b_i * TIME_ij + \epsilon_ij, with b_i = \zeta_i0 + \zeta_i1 * X.Baseline Is this correct? Now, I am completely unsure how to "translate" this into the syntax needed by lme. Is there any standard procedure on how to get from e.g. the Laird&Ware'82 matrix model notation to the lme inpu...
2002 Dec 10
3
clogit and general conditional logistic regression
...efulness is confined to the sort of data which arise in survival/proportional hazard applications. My question is: is 'clogit' capable of a general conditional logistic analysis? E.g. given a set of data on binomial experiments with Y=1 r_i times out of n_i, associated with levels A_i and B_i of factors A and B at N_A and N_B levels, would clogit(Y ~ A+B, method=c(Exact")) generate something sensible containing the results of a standard exact conditional logistic regression of Y on A and B? With thanks, Ted. -------------------------------------------------------------------...
2001 May 23
2
help: exponential fit?
Hi there, I'm quite new to R (and statistics), and I like it (both)! But I'm a bit lost in all these packages, so could someone please give me a hint whether there exists a package for fitting exponential curves (of the type t --> \sum_i a_i \exp( - b_i t)) on a noisy signal? In fact monoexponential decay + polynomial growth is what I'd like to try. Thanks in advance, Mirko. -- Dr. M. Luedde <Mirko.Luedde at CellControl.De> CellControl Biomedical Laboratories AG Am Klopferspitz 19, 82152 Martinsried +49-89-895275-0 +49-179-5252064 -...
2006 Jun 06
1
Problems using quadprog for solving quadratic programming problem
Hi, I'm using the package quadprog to solve the following quadratic programming problem. I want to minimize the function (b_1-b_2)^2+(b_3-b_4)^2 by the following constraints b_i, i=1,...,4: b_1+b_3=1 b_2+b_4=1 0.1<=b_1<=0.2 0.2<=b_2<=0.4 0.8<=b_3<=0.9 0.6<=b_4<=0.8 In my opinion the solution should be b_1=b_2=0.2 und b_3=b_4=0.8. Unfortunately R doesn't find this solution and what's surprising to me, evaluation the solution of solve.QP...
2005 Jan 17
0
a question of mixed effect in R
Dear all, I have a question about mixed effect model in R. The data set has 5 variables, X(response),subject, times, repeat, indicator The model is X_hijk=a_h+Z_h*b_i+r(ij)+e_hijk , where h=0,1(indicator), i=1,...,n(subject), j=1,...,n_i(times within subject; nested effect),k=1,2,3(repeat). Z_h=1 if h=1 =0 if h=0 b_i~N(0,c^2) random effect of subject r(ij)~N(0,d^2) random effect of times within subject e_hijk~N(0,e^2) error term which is independent with the...
2006 Aug 24
1
lmer(): specifying i.i.d random slopes for multiple covariates
Dear readers, Is it possible to specify a model y=X %*% beta + Z %*% b ; b=(b_1,..,b_k) and b_i~N(0,v^2) for i=1,..,k that is, a model where the random slopes for different covariates are i.i.d., in lmer() and how? In lme() one needs a constant grouping factor (e.g.: all=rep(1,n)) and would then specify: lme(fixed= y~X, random= list(all=pdIdent(~Z-1)) ) , that?s how it's done in the lme...
2008 Jul 02
1
Tobit Estimation with Panel Data
Hi all! Do you know if there is any R function/package that can be used to estimate "tobit" models with panel data (e.g. with random individual effects)? In economics, a "tobit" model is a model with a dependent variable that is left-censored at zero. Hence, it is a special case of a survival model and can be estimated using the "survival" package (see e.g.
2010 Feb 03
1
Package plm & heterogenous slopes
Dear r-helpers, I am working with plm package. I am trying to fit a fixed effects (or a 'within') model of the form y_it = a_i + b_i*t + e_it, i.e. a model with an individual-specific intercept and an individual- specific slope. Does plm support this directly? Thanks in advance! Otto Kassi
2010 Mar 04
1
logistic regression by group?
Hi, Looking for a function in R that can help me calculate a parameter that maximizes the likelihood over groups of observations. The general formula is: p = exp(xb) / sum(exp(xb)) So, according to the formulas I've seen published, to do this "by group" is product(p = exp(x_i * b_i) / sum(exp(x_i b_i))) Where i represents a "group" and we iterate through each group. Does anybody have any suggestions? Thanks! -N