search for: nonneg

Displaying 20 results from an estimated 99 matches for "nonneg".

2008 Apr 25
2
force glm estimates to be nonnegative
Is there a way to force certain formula parameters to be nonnegative? What I want to do is to estimate student capacity over time, namely by > capacity ~ Student + Student:Day I add this formula to a glm call and obtain negative learning slope estimates (Student:Day) in some cases. However, I don't want to allow for that. In such a case, glm should...
2007 Nov 19
2
All nonnegative integer solution
Dear all, Is there any method in R to find all possible nonnegative integer solutions to the linear equation with unit coefficients as follow: X1+X2+...+Xk=N Thank you, Amin Zollanvari
2009 Nov 27
0
NMF package for Nonnegative Matrix Factorization
The 'NMF' package implements a number of standard algorithms to perform Nonnegative Matrix Factorization. It also provides a flexible framework to easily test and develop new methods, as well as a layer to work with Bioconductor objects. The package is available from CRAN. Feedbacks are welcome. -- Renaud Gaujoux Computational Biology - University of Cape Town South Afric...
2009 Nov 27
0
NMF package for Nonnegative Matrix Factorization
The 'NMF' package implements a number of standard algorithms to perform Nonnegative Matrix Factorization. It also provides a flexible framework to easily test and develop new methods, as well as a layer to work with Bioconductor objects. The package is available from CRAN. Feedbacks are welcome. -- Renaud Gaujoux Computational Biology - University of Cape Town South Afric...
2000 Nov 26
1
Problem with NAs using chisq.test() (PR#748)
...g value where logical needed Now, it turned out that a fairly deep bug in my code occasionally produced NAs in the matrix, and that was the source of the confusion. Looking at the code, it is apparent that the test if (any(x < 0) || any(is.na(x))) stop("all entries of x must be nonnegative and finite") was designed to catch this, but it doesn't seem to, because the first any()-call is NA and so when using the operator ||, well, I bet you understand this better than I... :-) I figured, perhaps turn this around: if (any(is.na(x)) || any(x < 0)) stop("...
2001 Aug 01
1
glm() with non-integer responses
A question about the inner workings of glm() and dpois(): Suppose I call glm(y ~ x, family=poisson, weights = w) where y contains NON-INTEGER (but still nonnegative) values. (a) Does glm() still correctly maximise the weighted Poisson loglikelihood ? (i.e. the function given by the same formal expression as the weighted loglikelihood of independent Poisson variables Y_i except that the y_i are now nonnegative real numbers) (b) is this likely to...
2010 Oct 20
4
Changing sign on absolute numbers 0 problems
Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation is to use absolute numbers then use the 'sign' function in R to change the answer back to the correct -ve or +ve, for example, if; D<--69 M<-8 S<-10 then decimal<-D+(M/60)+(S/3600)
2006 Oct 11
2
expression as a parameter of binom.test (PR#9288)
Full_Name: Petr Savicky Version: 2.4.0 OS: Fedora Core release 2 Submission from: (NULL) (62.24.91.47) the error is > binom.test(0.56*10000,10000) Error in binom.test(0.56 * 10000, 10000) : 'x' must be nonnegative and integer while > binom.test(5600,10000) yields correct result. The same error occurrs for > binom.test(0.57*10000,10000)
2018 Feb 06
2
question with integrate function
Hi all, The function h below is a function of c and it should be a monotone increasing function since the integrand is nonnegative and integral is taken from c to infinity. However, as we can see from the plot, it is not shown to be monotone. Something wrong with the usage of integrate function? Thanks so much for your help. Hanna h <- function(c){ g <- function(x){pnorm(x-8.8, mean=0.4, sd=0.3, lower.tai...
2009 Nov 11
1
fisher.test negative value error
...64/python2.6/site-packages/rpy2/robjects/__init__.py", line 422, in __call__ res = super(RFunction, self).__call__(*new_args, **new_kwargs) rinterface.RRuntimeError: Error in function (x, y = NULL, workspace = 2e+05, hybrid = FALSE, control = list(), : all entries of 'x' must be nonnegative and finite* clearly every element of matrix m is +ve but I don't know why I am getting this error. I am using python 2.6,R-core-2.9.2-1 and rpy2. Please help me in this regard. Thanks, Bhanu. [[alternative HTML version deleted]]
2010 Jan 28
2
NA Replacement by lowest value?
Hi all, I need to replace missing values in a matrix by 10 % of the lowest available value in the matrix. I've got a function I've used earlier to replace negative values by the lowest value, in a data frame, but I'm not sure how to modify it... nonNeg = as.data.frame(apply(orig.df, 2, function(col) # Change negative values to a small value, close to zero { min.val = min(col[col > 0]) col[col < 0] = (min.val / 10) col # Column index })) I think this is how to start, but the NA replacement part doesn't work... newMatrix...
2009 Nov 03
2
Change negative values in column
...m value of the column. However, I get the following error: Error in if (x[i] < 0) { : argument is of length zero As well, I would "minimum" to be the smallest of the non-negative values... Aa_non_neg=(fieldTrial0809$Aa) # Copy column from data frame to manipulate nonNegative = function(x) { minimum=min(x) # Should only use positive minimum! for (i in x) { if(x[i]<0) # Found a negative value { x[i]=minimum/10 # Change to a new non-negative value } } } nonNegative(Aa_non_neg) # Apply function on column ____...
2007 Jun 06
3
Using odesolve to produce non-negative solutions
Hello, I am using odesolve to simulate a group of people moving through time and transmitting infections to one another. In Matlab, there is a NonNegative option which tells the Matlab solver to keep the vector elements of the ODE solution non-negative at all times. What is the right way to do this in R? Thanks, Jeremy P.S., Below is a simplified version of the code I use to try to do this, but I am not sure that it is theoretically right dy...
2015 Jan 31
2
error code 1 from Lapack routine 'dsyevr'
...ne_intersection.kernel) : error code 1 from Lapack routine 'dsyevr' Execution halted". As you see, I was trying to compute the eigenvalues of a matrix but got this error. Is there anyone who knows what this error means and how I can fix it? Theoretically the eigenvalues should be nonnegative, if it helps. Thank you! -- View this message in context: http://r.789695.n4.nabble.com/error-code-1-from-Lapack-routine-dsyevr-tp4702571.html Sent from the R devel mailing list archive at Nabble.com.
2018 Mar 19
1
trivial typo in man/pretty.Rd
...been there for 20 years: https://github.com/wch/r-source/blame/ba7920a99fb2fb62b89e404e65f8b132ed4c150a/src/library/base/man/pretty.Rd =================================================================== --- pretty.Rd (revision 74426) +++ pretty.Rd (working copy) @@ -21,8 +21,8 @@ \item{min.n}{nonnegative integer giving the \emph{minimal} number of intervals. If \code{min.n == 0}, \code{pretty(.)} may return a single value.} - \item{shrink.sml}{positive numeric - by a which a default scale is shrunk in the case when + \item{shrink.sml}{positive numeric factor + by which a def...
2005 Aug 12
1
access assigned objects
...<-function(x) {dfrow<-nrow(x) mm <- vector("list", dfrow) for(i in 1:dfrow) mm[[i]] <- matrix(x[i,],nr=2) } I don't know how to access each mm[[i]] as everything I've tried gives me the error that "Error in fisher.test(mm[[i]]) : all entries of x must be nonnegative and finite" All the numbers in the matrices are between 1 and 600. Thanks, Beth [[alternative HTML version deleted]]
2007 Jul 11
0
Some questions about quadratic programming (QP)
...rog package. My questions are here: 1- In the document for the package (The quadprog Package), the inequality constraint is mentioned with >= , however in a standard QP, this usaully is written with <= . This constraint should be multiplied by a negativity sign to be standard ? 2- How about nonnegativity constraints ? Are that possible to be handled via upper and lower bounds? In document, nonnegativity is not mentioned. Is there any argument for that? 3- In QP formulation we have a constant 1/2 in objective function. This should be multiplied by the user or it is done by the algorithm? 4-...
2018 Feb 06
0
question with integrate function
...n the previous email that the function h() is a monotone decreasing function. Thanks very much. 2018-02-06 13:32 GMT-05:00 li li <hannah.hlx at gmail.com>: > Hi all, > The function h below is a function of c and it should be a monotone > increasing function since the integrand is nonnegative and integral is > taken from c to infinity. However, as we can see from the plot, it is not > shown to be monotone. Something wrong with the usage of integrate function? > Thanks so much for your help. > Hanna > > > > h <- function(c){ > g <- function(x...
2008 Apr 15
1
SVD of a variance matrix
Hello! I suppose this is more a matrix theory question than a question on R, but I will give it a try... I am using La.svd to compute the singular value decomposition (SVD) of a variance matrix, i.e., a symmetric nonnegative definite square matrix. Let S be my variance matrix, and S = U D V' be its SVD. In my numerical experiments I always got U = V. Is this necessarily the case? Or I might eventually run into a SVD which has U != V? Thank you in advance for your insights and pointers. Giovanni -- Giovan...
2012 Jun 20
2
lmomco in gev estimation
...mom.ub(why)) whyr #what I get was a very bias estimate of k (here xi is location) xi alpha kappa 835.7773068 275.4656939 0.1683969 #even when I replicates it 1000 times and fit into the distribution, the shape parameter is still not near to -0.1, but it is going near to the nonnegative value (0.1 rather than -0.1) xi alpha kappa 820.89316109 259.45826487 0.09621897 can somebody help me? [[alternative HTML version deleted]]