Displaying 3 results from an estimated 3 matches for "djbanana".
Did you mean:
dbanana
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
2012 Feb 06
1
MLEs using optim
I am trying to use the optim command to get the MLEs for a number of
parameters based on some data. Is it possible to write a program that
maximizes the likelihood and stores the parameters (many times)? I need to
do this a lot of times, each time the data will be updated with more entries
(rows). I need to see how the new data is affecting the previous parameter
estimates of the model. What is
2012 Nov 21
2
ifelse + numeric
Hi,
I have a data frame and I need to add another column.
I am using: data[,4] <- ifelse(data[,3]<1,data[,1]/(1-data[,3]),"NA")
This is returning values but are in quotation marks. The error I am getting
is "non-numeric argument to binary operator"
I need column four in data to be numeric. Tried as.numeric but it did not
work well either.
Would appreciate any help.