Displaying 3 results from an estimated 3 matches for "fhernanb".
Did you mean:
fernand
2011 Oct 18
2
About an integral univariate problem
Hello all R users
I want to calculate this univariate integral:
exp(-x)*sum(y^x) respect to x from 0 to 3 where y is a vector y=(2,3,5).
In fact, the original y vector has a large number of elements but I propose
with 3 elements.
I know that I can resolve this problem doing
fun <- function(x) exp(-x)*(2^x+3^x+5^x)
integrate(fun,0,3)
When the y vector has a large number of elements the
2012 Feb 29
2
Converting a function from Splus to R
I have a function written for Splus, when I run it in R I obtain get an error
because the function has the elements "0.d0" and "2.d0". How can I change it
to run in R?
The function can be found in page 230 from
http://www.stat.wisc.edu/~mchung/teaching/stat471/stat_computing.pdf
Function is as follows:
gauher <- function(n) {# Gauss-Hermite: returns x,w so that
2012 Jul 04
2
About nlminb function
Hello
I want to use the nlminb function but I have the objective function like
characters. I can summarize the problem using the first example in the
nlminb documentation.
x <- rnbinom(100, mu = 10, size = 10)
hdev <- function(par) -sum(dnbinom(x, mu = par[1], size = par[2], log =
TRUE))
nlminb(c(9, 12), objective=hdev)
With the last instructions we obtain appropriate results. If I have