It is not simply the answer, it is a list
str(integrate(dnorm, -1.96, 1.96))
List of 5
$ value : num 0.95
$ abs.error : num 1.05e-11
$ subdivisions: int 1
$ message : chr "OK"
$ call: language integrate(f = dnorm, lower = -1.96, upper = 1.96)
- attr(*, "class")= chr "i
Hi,
I need to do a calculation in R which involves adding the estimate of a
numerical integration with another number - however, if I add the number to
the output of the intergrate function (which when run on its own provides me
with a number with error), I get the message 'non-numeric argument to
andrea.tor...@apat.it wrote:
Dear all,
I have a problem with the integration of the following function.
Could you please give some suggestions?
Thank you very much!!!
y<-rnorm(n=100)
f<-function(x,xi,h){
n<-length(xi)
Ke<-c()
for(t in 1:n) {
Ke[t]<-dnorm((x-xi[t])/h)
}
fke<-sum(Ke)*(1
Dear all,
I have a problem with the integration of the following function.
Could you please give some suggestions?
Thank you very much!!!
y<-rnorm(n=100)
f<-function(x,xi,h){
n<-length(xi)
Ke<-c()
for(t in 1:n) {
Ke[t]<-dnorm((x-xi[t])/h)
}
fke<-sum(Ke)*(1/(n*h))
fke<-fke^2
return(fke)
4 matches
Mail list logo