search for: nnls

Displaying 20 results from an estimated 24 matches for "nnls".

Did you mean: nls
2007 Oct 15
0
new package 'nnls'
A new package 'nnls' is now available on CRAN. The package provides an R interface to the Lawson-Hanson NNLS algorithm for non-negative least squares that solves the least squares problem A x = b with the constraint x >= 0. The Lawson-Hanson NNLS algorithm was published in Lawson CL, Hanson RJ (1974). Solvin...
2007 Oct 15
0
new package 'nnls'
A new package 'nnls' is now available on CRAN. The package provides an R interface to the Lawson-Hanson NNLS algorithm for non-negative least squares that solves the least squares problem A x = b with the constraint x >= 0. The Lawson-Hanson NNLS algorithm was published in Lawson CL, Hanson RJ (1974). Solvin...
1999 Jul 07
1
Linear Models with positive coefficients?
Hi, is it possible in one of the libraries on linear methods to constrain the coefficients to be positive? Thanks Chris -- Christoph M. Friedrich | mailto:friedrich at computer.org Gesellschaft f?r Modulfermenterbau mbH (GfM mbH) | http://www.tussy.uni-wh.de/~chris Alfred-Herrhausen Str. 44 ; D-58455 Witten, Germany
2012 Jan 04
0
Non Negative Least Squares Regression with nnls
Hello R experts, I have two questions related to the nnls library (http://www.inside-r.org/packages/cran/nnls), and more broadly to linear regression with positive coefficients. Sample code is below the Qs. Q1: Regular regression (with lm) gives me the significance of each variable. How do I get variable significance with nnls? If there's no ready fu...
2007 Dec 03
0
new package 'bvls', update of 'nnls'
...rker have agreed to distribution under GPL version 2 or newer. The function 'bvls::bvls' returns an object of (S3) class 'bvls', which has methods for 'coefficients', 'fitted.values', 'deviance' and 'residuals'. ==== Version 1.1 of the package 'nnls' is available on CRAN. Changes between Version 1.0 and 1.1: o The function 'nnls::nnls' returns an object of (S3) class 'nnls', which has methods for 'coefficients', 'fitted.values', 'deviance' and 'residuals' o The function 'nnnpls:...
2007 Dec 03
0
new package 'bvls', update of 'nnls'
...rker have agreed to distribution under GPL version 2 or newer. The function 'bvls::bvls' returns an object of (S3) class 'bvls', which has methods for 'coefficients', 'fitted.values', 'deviance' and 'residuals'. ==== Version 1.1 of the package 'nnls' is available on CRAN. Changes between Version 1.0 and 1.1: o The function 'nnls::nnls' returns an object of (S3) class 'nnls', which has methods for 'coefficients', 'fitted.values', 'deviance' and 'residuals' o The function 'nnnpls:...
2012 Oct 16
1
nnls() help
I'm trying to get significance of coefficients as for lm() but I news help. Inviato da iPad [[alternative HTML version deleted]]
1999 Jul 26
1
Logistic regression with coef>0
Hi, recently I saw but did not pay too much attention to a question that concerned regression with positive coefficients. In Splus, thereis the nnls() function that can be used if I am not wrong, but what about R ? Now I have the same problem: doing a logistic regression under constraint that coefs are non negative. What can I do with R? is there a (weighted) nnls() counterpart available? Thanks for any help! Christian -.-.-.-.-.-.-.-.-.-.-.-...
2004 Mar 01
1
non-negative least-squares
Hi all, I am trying to do an inversion of electromagnetic data with non-negative least squares method (Tikhonov regularisation) and have got it programmed in S-Plus. However I am trying to move all my scripts from S-Plus to R. Is there an equivalent to nnls.fit in R? I think this can be done with pcls? Right? S-Plus script: A, L and data are matrices, lambda is a vector of possible lambda (smoothing) values > "nntik"<-function(A,L,data,lambda) > { > H<-rbind(A,lambda*L) > i<-1:(nrow(L)+length(data)) > q<-ifelse(...
2001 Nov 20
0
Summary: non-negative least squares
...ug in the library quadprog and the scaling is often a workaround. I don't know how this compares to Brian Ripleys suggestion (use optim) in times of speed and accuracy, but it should be competitive. Yours, Marcel #--------------------------------------------------------------------------- -- nnls.fit <- function(x,y,wsqrt=1,eps=0,rank.tol=1e-07) { ## Purpose: Nonnegative Least Squares (similar to the S-Plus function ## with the same name) with the help of the R-library quadprog ## ------------------------------------------------------------------------ ## Attention: ## - weight...
2011 Dec 21
3
Non-negativity constraints for logistic regression
Dear R users, I am currently attempting to fit logistic regression models in R, where the slopes should be restricted to positive values. Although I am aware of the package nnls (which does the trick for linear regression models), I did not find any solution for logistic regression. If there is any package available for this purpose, I would be interested to know them. Alternatively, I realize it is possible to optimize a specialized likelihood function that does the tric...
2012 Oct 19
2
Which package/function for solving weighted linear least squares with inequality and equality constraints?
Dear All, Which package/function could i use to solve following linear least square problem? A over determined system of linear equations is given. The nnls-function may would be a possibility BUT: The solving is constrained with a inequality that all unknowns are >= 0 and a equality that the sum of all unknowns is 1 The influence of the equations according to the solving process is weighted too. llAx-bll2 * weight with xi >=0 and sum(x)=1 I...
2009 Jul 06
1
Performance degradation on multi-processor system
...stem. We are a bit surprised by this because we figured that each instance of R is running in its own processor, and therefore running a second, third or fourth instance should not affect the performance of the first instance. Here's a test script that exhibits this behavior: library("nnls") #load library set.seed(seed=100) #set random number generator seeds X.mat=matrix(runif(2000*500,0,1),nrow=2000,ncol=500) y.vec=runif(2000,0,1) X.mat[1:1000,5]=X.mat[1:1000,5]+4*y.vec[1:1000] X.mat[1001:2000,15]=X.mat[1001:2000,15]+4*y.vec[1001:2000] for (j in 1:100) { f...
2009 Nov 04
1
s4 generic issue
...x = matrix(0, k, nb), job = job, info = integer(1L), DUP = FALSE, PACKAGE = "base") 9: base::backsolve(r, x, k = ncol(r), upper.tri = TRUE, transpose = FALSE, ...) 8: backsolve(R, backsolvet(R, Sign[positive])) 7: backsolve(R, backsolvet(R, Sign[positive])) 6: nnls.lars(active, Sign, R, directions, Gram[active, active], trace = trace, use.Gram = TRUE, eps = eps) 5: lars(x, y, type = "for") 4: eval.with.vis(expr, envir, enclos) 3: eval.with.vis(ei, envir) 2: source(zfile, local, echo = echo, prompt.echo = paste(prompt.prefix, getOptio...
2008 May 15
5
Inconsistent linear model calculations
...om NIST nlme Linear and Nonlinear Mixed Effects Models nlstools Tools for nonlinear regression diagnostics nlt A nondecimated lifting transform for signal denoising nlts (non)linear time series analysis nnls The Lawson-Hanson algorithm for non-negative least squares (NNLS) plotrix Various plotting functions quantreg Quantile Regression Rcmdr ** No title available (pre-2.0.0 install?) ** sandwich R...
2001 Mar 12
2
Regressions with monotonicity constraints
This seems to be a recurrent topic, but I don't remember hearing a definitive answer. I also apologies for cross-posting. Say I have a numerical response variable and a bunch of multi-level factors I want to use for modeling. I don't expect factor interaction to be important so there will be no interactions in the model. All this would be a perfect job for ANOVA except for one additional
2009 May 27
1
Constrained fits: y~a+b*x-c*x^2, with a,b,c >=0
I wonder whether R has methods for constrained fitting of linear models. I am trying fm<-lm(y~x+I(x^2), data=dat) which most of the time gives indeed the coefficients of an inverted parabola. I know in advance that it has to be an inverted parabola with the maximum constrained to positive (or zero) values of x. The help pages for lm do not contain any info on constrained fitting. Does anyone
2011 Dec 21
0
Non-negativity constraint for logistic regression
Dear R users, I am currently attempting to fit logistic regression models in R, where the slopes should be restricted to positive values. Although I am aware of the package nnls (which does the trick for linear regression models), I did not find any solution for logistic regression. If there is any package available for this purpose, I would be interested to know them. Alternatively, I realize it is possible to optimize a specialized likelihood function that does the tric...
2011 Jan 20
1
fix sign of a coefficient in formula
Dear R users & experts, I'd like to create a model using lm (or glm) under some constraints of how coefficients for each component could look like (sort of a range of coefficients that should be allowed). So let's go for an example : model=lm(age ~ eyecolor + height, data=inputdata) So let's suppose that R pops out a model with positive estimates for the coefficients eyecolor
2010 May 11
1
nls() and nls2() behavior?
...= c(rep( m1, 7), rep( m2, 3), rep( m3, 5)); yhat= tgts.mean + b*x #debug cat("Parameters: b=", b, " m123=", m1, m2, m3, " leading to ", sum( (ydebug-yhat)^2 ), "\n") return( yhat ); } sameformula= (y ~ objective.xs(b, m1, m2, m3, x, y)) cat("\nNLS2 Function --- what do you do?:\n"); print(nls2( sameformula, data=d, control= nls.control(tol=1e-12), algorithm="brute-force", start=list( b=0.3, m1=0.5, m2=0.5, m3=0.5, trace=TRUE ) ) ); cat("\n---but with this b starting value, this is so much better (?!):\n"...