Displaying 20 results from an estimated 2000 matches similar to: "Problem with integrate()"
2007 Sep 12
1
Integrate() error message, I am at a loss
Hello!
I have a problem with integrate() in my function nctspa(). Integrate
produces an error message "evaluation of function gave a result of
wrong length". I don't know what that means. Could anyone suggest me
what is wrong with my function?
These are the examples of function calls that work OK:
nctspa(a=1:10,n=5)
nctspa(a=1:10, n=5, mu=2, theta=3, renorm=0)
This does not work:
2006 Aug 24
1
Hyphenated terms
I am having a problem with any terms which contain hyphens in them. Is
there a particular reason why this wouldn''t work? i''m using aaf, and
have tried with the the previous version (pre 0.10.0) and the newest
versions of both ferret and aaf. Basically, the problem is that
term1-term2 is something my users want to search for, and it appears in
the titles of publications,
2017 Nov 13
2
question on nbdkit shutdown behavior
I'm observing a difference in timing on nbdkit shutdown that is
dependent on client behavior, and I wonder if that's a bug, but I can't
figure out where to patch it.
When there is no connection present, sending SIGINT to nbdkit terminates
immediately.
If, on the other hand, there is a single client currently connected, the
termination behavior on SIGINT depends on what the client has
2005 Apr 17
1
nls segmented model with unknown joint points
Hello,
I am interested in fitting a segmented model with unknown joint points
in nls and perhaps eventually in nlme. I can fit this model in sas (see
below, joint points to be estimated are a41 and a41), but am unsure how
to specify this in the nlm function. I would really appreciate any
suggestions or example code. Thanks a lot. -andy
proc nlin data=Stems.Trees;
params b41=-3 b42=1.5
2010 Nov 10
3
create a pairwise coocurrence matrix
Hi all,
I am trying to construct a pairwise coocurrence matrix for certain terms
appearing in a number of documents. For example I have the following table
with binary values showing the presence or absence of a certain term in a
document:
term1 term2 term3 term4 term5 doc1 1 1 0 0 1 doc2 1 1 0 1 1 doc3 1 0 0
0 1
And I want to have a matrix with the number of the pairwise coocurrencies.
So,
2011 Mar 29
1
Dirichlet surface
Dear list members,
I want to draw surfaces of Dirichlet distributions with different
parameter settings.
My code is the following:
#<begin code>
a1 <- a2 <- a3 <- 2
#a2 <- .5
#a3 <- .5
x1 <- x2 <- seq(0.01, .99, by=.01)
f <- function(x1, x2){
term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3))
term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
2007 Jan 01
4
Help with filled.contour()
The following plot is a first approximation to what I need:
***********************************
mu1 <- 0
mu2 <- 5
s <- 1
x <- seq(-2.5, 7.5, length = 41)
y <- seq(-2.5, 2.5, length = 41)
f <- function(x,y){
term1 <- 1/(2*pi*sqrt(s*s))
term2 <- -1/2
term3 <- (x - mu1)^2/s
term4 <- (y - mu1)^2/s
term5 <- (x - mu2)^2/s
term1*(.5 * exp(term2*(term3 + term4)) + .5 *
2007 Aug 16
0
Help with optimization using GENOUD
Dear Friends,
I have been trying to learn how to use the derivative free optimization algorithms implemented in the package RGENOUD by Mebane and Sekhon. However, it does not seem to work for reasons best described as my total ignorance. If anybody has experience using this package, it would be really helpful if you can point out where I'm making a mistake.
Thanks in advance
Anup
Sample
2012 Nov 05
0
slider control questions
DeaR UseRs,
I have the following code (see below).
It is working as expected although I have two problems/questions:
- how can I set the size of the graph? It may sound silly, but I couldnt figure that out
- is it possible to export this small "interactive aplication" to html or a latex document, or maybe pdf?
Thank you for your attentions.
Best wishes:
Daniel
the code:
2019 Sep 18
1
[nbdkit PATCH] server: Saner filter .close calls
I found a core dump:
term1$ nbdkit -fv --filter=xz null xz-max-depth=$((0x4000000000000000))
term1...
term2$ qemu-nbd --list
term1...
nbdkit: debug: null: open readonly=1
nbdkit: error: calloc: Cannot allocate memory
nbdkit: debug: xz: close
Segmentation fault (core dumped)
(Note that the use of --run or daemonizing nbdkit makes it a bit
harder to see the core dump, but it is still happening.)
2007 Jun 15
0
Question with nlm
Hi,
I would really appreciate if I could get some help here. I'm using nlm to minimize my negative log likelihood function. What I did is as follows:
My log likelihood function (it returns negative log likelihood) with 'gradient' attribute defined inside as follows:
# ==========Method definition======================
logLikFunc3 <- function(sigma, object, totalTime) {
y <-
2013 Jun 16
3
Backend for Lucene format indexes-How to get doclength
Hi, all:
I have wrote a demo patch for Backend for Lucene format indexes, Lucene
version is 3.6.2.
http://lucene.apache.org/core/3_6_2/fileformats.html
Now, this demo patch just support the basic features in Lucene. Compound
File(.cfs/.cfe)?term vector(.tvx/.tvd/.tvf)
delete document(.del) are not supported, skip list in .fdx is not supported
too
example/quest.cc is used to test this demo.
2017 Nov 17
0
[nbdkit PATCH 6/6] Add --threads option for supporting true parallel requests
It's finally time to implement one of the TODO items: we want to
support a thread pool of parallel readers from the client, in
order to allow multiple in-flight operations with potential
out-of-order completion. We also need at least one plugin that
supports parallel processing for testing the option; the file
plugin fits the bill.
Add and document a new command line option, -t/--threads=N,
2019 Jan 22
2
Re: [PATCH nbdkit v2 2/4] partition filter: Support MBR logical partitions.
On 1/21/19 12:15 PM, Richard W.M. Jones wrote:
> ---
> filters/partition/nbdkit-partition-filter.pod | 5 -
> filters/partition/partition-mbr.c | 105 +++++++++++++++++-
> tests/test-partitioning1.sh | 22 +++-
> 3 files changed, 121 insertions(+), 11 deletions(-)
>
> @@ -69,16 +75,16 @@ find_mbr_partition (struct nbdkit_next_ops *next_ops,
2003 Oct 03
3
openoffice port build on FreeBSD 4.9
I am very new to FreeBSD and Unix in general. I may
have more problems than I think, but here goes. I am
trying to make depend && install WITH_BSD_JDK=TRUE
clean with openoffice. Everything works fine until I
get to the jvm section (seen below). I have tried
looking for this on the net, but I have not been to
successful in finding a solution.
Thanks for your help.
Stephen
2007 Feb 27
1
Additional args to fun in integrate() not found?
Hello, fellow Rdicts,
I have the code for the program below. I need to integrate a function
of "x" and "p". I use integrate to integrate over "x" and pass "p" as
an additional argument. "p" is specified and given default value in
the argument list. Still, integrate() cannot read "p", unless I
explicitly insert a numeric value in the
2012 Aug 07
4
help to program my function
HI
>i have a problem please help me to solve it:
http://r.789695.n4.nabble.com/file/n4639434/aj.pdf aj.pdf
>i want to calculate the vecteur a[j] where j: 1...8
>this is the code in R:
>aj.fun <- function(j, i, X, z, E, beta0, beta1){
+ n <- length(X)
+ iX <- order(X)
+ iz <- order(z)
+ e1 <- -(beta)*z[ iz[1:(i - 1)] ]
+ numer <- E[j] - sum( X[ iX[1:(i - 1)] ]
2008 Oct 09
3
solve cdf for noncentrality (PR#11527)
Full_Name: Jerry W. Lewis
Version: 2.7.0
OS: Windows XP Professional
Submission from: (NULL) (198.180.131.16)
If you are saying that there is no need to solve for the noncentrality
parameter, please justify this amazing assertion.
If you are saying that this need is already adequately addressed in R, then
please enlighten me.
2010 Aug 12
1
Need help to understand integrate function
Hi,
I'm running into a wall when trying to use the integrate function. I
have the following setting:
powerLaw2 <- function(x,l1,l2,c0,t0) {
idx <- which(x <= 0);
if (length(idx) > 0) {
x[idx] <- 0;
}
xl <- (-l1+l2)*log(x/t0);
L <- log(c0)-l1*log(x)-log(1+exp(xl));
L <- exp(L);
return(L);
}
plCDF2 <- function(x,l1,l2,c0,t0) {
2008 Apr 04
0
looking for a CDF of bivariate noncentral Chisquare
Hi,
I would like to know if there is a program written in R to get the CDF
(cumulative distribution function) of a bivariate non-central chi-square
distribution.
Hope someone will reply.
Thank you,
Rossita M Yunus
yunus@usq.edu.au
This email (including any attached files) is confidentia...{{dropped:19}}