Displaying 20 results from an estimated 43 matches for "a_i".
Did you mean:
_i
2006 Oct 21
2
problem with mode of marginal distriubtion of rdirichlet{gtools}
Hi all,
I have a problem using rdirichlet{gtools}.
For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ (
\sum_{i}a_i - n)$;
The means are $a_i / (\sum_{i} a_i ) $;
I tried to study the above properties using rdirichlet from gtools. The code
are:
##############
library(gtools)
alpha = c(1,3,9) #totoal=13
mean.expect = c(1/13, 3/13, 9/13)
mode.expect = c(0, 2/10, 8/10) # this is for the...
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.
2010 Aug 24
1
Constrained non-linear optimisation
I'm relatively new to R, but I'm attempting to do a non-linear maximum
likelihood estimation (mle) in R, with the added problem that I have a
non-linear constraint.
The basic problem is linear in the parameters (a_i) and has only one
non-linear component, b, with the problem being linear when b = 0 and
non-linear otherwise. Furthermore, f(a_i) <= b <= g(a_i) for some
(simple) f and g.
Using optim, I can get the optimisation to work when the non-linearity
is included but not constrained, but gives po...
2008 Aug 11
3
R-help? how to take difference in next two elements
Hi,
I'd like to take difference for a sequence a between a_i and a_i-2, for
instance,
a<-c(2,3,4,8,1)
I need (2, 5, -3) as a result. If not using a for loop, can anyone help me?
Thanks a lot.
Dot
--
View this message in context: http://www.nabble.com/R-help--how-to-take-difference-in-next-two-elements-tp18927968p18927968.html
Sent from the R help mailin...
2003 Feb 19
4
fitting a curve according to a custom loss function
Dear R-Users,
I need to find a smooth function f() and coefficients a_i that give the best
fit to
y ~ a_0 + a_1*f(x_1) + a_2*f(x_2)
Note that it is the same non-linear transformation f() that is applied to
both x_1 and x_2.
So my first question is how can I do it in R?
A more general question is this: suppose I have a utility function U(a_i,
f()), where f() is say...
2013 Mar 22
1
Integration of vector syntax unknown
Hello,
I'm very new to using R, but I was told it could do what I want. I'm not sure how best to enter the information but here goes...
I'm trying to transfer the following integral into R to solve for ln(gamma_1), on the left, for multiple instances of gamma_i and variable N_i.
gamma_i is, for example, (0, 0.03012048, 0.05000000, 0.19200000, 0.44000000, 0.62566845)
N_i (N_1 or N_2) is between 0 and 1 so that N_1+N_2=1, so if N_1=(0,.166,.180,.250,.325,.374), then N_2=(1.000, 0.834, 0.820, 0.750, 0.675, 0.626)
a_i (a_1 or a_2)
So, for gamma_i (in thi...
2000 Mar 10
1
logit and polytomous data
I am new to generalized linear models and studying
McCullagh & Nelder (1989). Especially, I have a problem
resembling the \"cheese taste\" example (5.3.1. p. 109) of
the book. I tried to analyse the cheese example with R but
failed to do so because R allowed me to use logit link
function only with binary family that supposes 0 <= y <= 1.
Do I need to scale the y\'s or
2011 Feb 16
0
Constraints in projection pursuit regression
Hi,
I am solving a projection pursuit regression problem, of the
form y = \sum_i f_i (a_i^T x), where a_i are unknown directions, while
f_i are unknown univariate link functions. The following is known about
each f_i:
1. f_i (0) = 0 (that is, each f_i passes through the origin)
2. f_i is monotonic.
Is there a way to ensure that the function ppr() in R produces solutions that res...
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 gradien...
2000 Mar 20
1
CART and the `tree' contrib package
...nd R have
implementations of this. However, the book talks about the possibility of
extending the existing `standard' set of questions (for continuous
variables, these are of the form X < c where X is the variable, c some
const) to questions of the form (for continuous variables)
sum over i a_i X_i < c where X_i are the cont. variables, a_i and c
consts.
However, this extended set is not implemented in either the R `tree'
package nor the Splus one, to the best of my knowledge. (I believe there
is some original CART package, but I don't know about that). Anyway, I was
wondering...
2009 May 07
2
lasso based selection for mixed model
Dear useRs (called Frank Harrell, most likely),
after having preached for years to my medical colleagues to be cautious
with stepwise selection procedures, they chanted back asking for an
alternative when using mixed models.
There is a half dozen laXXX packages around for all types of linear models,
but as far I see there is none for mixed models such as lme. Even
boot.stepAIC (which I
2008 May 16
1
Making slope coefficients ``relative to 0''.
...m interested 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...
2000 Mar 31
2
linear models
....), ie. 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...
2007 Aug 05
0
null hypothesis for two-way anova
Dear R community,
Confused by some of my lab results I ask for the definition of the null
hypothesis of a two-way analysis of variance in R (anova() and aov()).
Starting with the following model
y = a_i + b_j , i in A and j in B
is the tested null hypothesis
H_0: a_i = 0 for all i in A
or
H_0: a_m = a_n for any m and n in A?
Consequently the same questions for interaction effects. Starting with
the model
y = a_i + b_j + f_ij , i in A and j in B
is the tested null hypothesis
H_0: f_ij = 0...
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
2002 Dec 10
3
clogit and general conditional logistic regression
...t its usefulness 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-1...
2005 Sep 21
2
Help on optim
Dear R-help,
I am new to optim function and need some help with optimization.
Problem description: I am trying to optimize a weights vector
such that it produce maximum value for a function maxVal. The
optimization is subjected to constraint. The constraints are a) Min
weight should be greater than or equal to Zero. b) Max weight should
be less than or equal to 1 c) Sum of the
2010 Aug 05
3
[LLVMdev] a problem when using postDominatorTree
...> [2] %bb1 {1,2}
> [2] %bb {3,4}
> [2] %entry {5,6}
> [2] %bb8 {7,20}
> [3] %bb7 {8,9}
> [3] %bb2 {10,11}
> [3] %bb6 {12,13}
> [3] %bb5 {14,19}
> [4] %bb4 {15,16}
> [4] %bb3 {17,18}
> 0 opt 0x085643e8
> Stack dump:
> 0. Program arguments: opt
> -load=/home/a_i/llvm/llvm-2.7/Release/lib/ConsDumper.so -consdumper -f
> -o pbzip2_2s.bc pbzip2.bc -debug
> 1. Running pass 'dump constraints' on module 'pbzip2.bc'.
> Segmentation fault/
> I have no hint about this. Does anyone know about the reason?
Not yet. However I would love to...
2002 Aug 20
0
Re: SVM questions
...ed by class, and the number of SV are stored in the nSV component.
So you should get the start indices with sth. like
cumsum(c(1,model$nSV)).
g.,
David.
----------------
For class prediction in the binary case, the class of a new data vector
``n'' is usually given by *the sign* of
Sum(a_i * y_i * K(x_i, n)) + rho
i
where x_i is the i-th support vector, y_i the corresponding label, a_i
the corresponding coefficiant, and K is the kernel (in your case, the
linear one, so
K(u,v) = u'v).
Now, ``libsvm'' actually returns a_i * y_i as i-th coefficiant and the
*negative* rh...