Displaying 20 results from an estimated 1200 matches similar to: "least squares regression using (inequality) restrictions"
2003 Oct 04
1
subset VAR time series models
Dear R user,
I would like to estimate a multivariate VAR model (vector autoregressive
model) with arbitrary individual linear parameter constraints. So far I
used the "ar" command from package ts for unrestricted models.
Unfortunately, this command does not offer the possibility to estimate
subset VAR models.
Is there a package or command that I can use?
Thank you very much!
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
2010 Dec 06
1
use pcls to solve least square fitting with constraints
Hi,
I have a least square fitting problem with linear inequality
constraints. pcls seems capable of solving it so I tried it,
unfortunately, it is stuck with the following error:
> M <- list()
> M$y = Dmat[,1]
> M$X = Cmat
> M$Ain = as.matrix(Amat)
> M$bin = rep(0, dim(Amat)[1])
> M$p=qr.solve(as.matrix(Cmat), Dmat[,1])
> M$w = rep(1, length(M$y))
> M$C = matrix(0,0,0)
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
2013 Mar 19
0
linear model with equality and inequality (redundant) constraints
Dear R-users,
in the last days I have been trying to estimate a normal linear model with equality and inequality constraints.
Please find below a simple example of my problem.
Of course, one could easily see that, though the constraints are consistent, there is some redundancy in the specific constraints. Nevertheless my actual applications can get much larger and I would not like to manually
2007 Nov 25
1
GAM with constraints
Hi,
I am trying to build GAM with linear constraints, for a general link
function, not only identity. If I understand it correctly, the function
pcls() can solve the problem, if the smoothness penalties are given.
What I need is to incorporate the constraints before calculating the
penalties. Can this be done in R?
Any help would be greately appreciated.
--
View this message in context:
2002 Apr 09
2
Restricted Least Squares
Hi,
I need help regarding estimating a linear model where restrictions are imposed on the coefficients. An example is as follows:
Y_{t+2}=a1Y_{t+1} + a2 Y_t + b x_t + e_t
restriction
a1+ a2 =1
Is there a function or a package that can estimate the coefficient of a model like this? I want to estimate the coefficients rather than test them.
Thank you for your help
Ahmad Abu Hammour
--------------
2013 Mar 06
1
Constrained cubic smoothing spline
Hello everone,
Anyone who knows how to force a cubic smoothing spline to pass through a particular point?
I found on website someone said that we can use "cobs package" to force the spline pass through certain points or impose shape constraints (increasing, decreasing). However, this package is using B-spline and can only do linear and quadratic
2009 Feb 25
1
monotonic GAM with more than one term
Hi,
Does anyone know how to fit a GAM where one or more smooth terms are
constrained to be monotonic, in the presence of "by" variables or
other terms? I looked at the example in ?pcls but so far have not been
able to adapt it to the case where there is more than one predictor.
For example,
require(mgcv)
set.seed(0)
n<-100
# Generate data from a monotonic truth.
2006 Sep 04
2
Fitting generalized additive models with constraints?
Hello,
I am trying to fit a GAM for a simple model, a simple model, y ~ s(x0) +
s(x1) ; with a constraint that the fitted smooth functions s(x0) and s(x1)
have to each always be >0.
>From the library documentation and a search of the R-site and R-help
archives I have not been able to decipher whether the following is possible
using this, or other GAM libraries, or whether I will have to try
2011 Sep 08
3
global optimisation with inequality constraints
Dear All,
I would like to minimise a nonlinear function subject to linear inequality constraints as part of an R program. I have been using the constrOptim function. I have tried all of the methods that come with Optim, but nothing finds the correct solution. If I use the correct solution as the vector of starting values, though, my program does output the correct solution and optimum - the
2005 Mar 01
1
constraining initial slope in smoother.spline
Hello. I want to fit a smoother spline (or an equivalent local
regression method) to a series of data in which the initial value of the
1st derivative (slope) is constrained to a specific value. Is it
possible to do this? If so, how?
Bill Shipley
[[alternative HTML version deleted]]
2010 Jan 21
1
Double inequality with plotmath
Hello,
I'm fairly new to R and I can't work out how to produce a double
inequality like (LaTeX) $0 \leq x \leq 1$ in the legend of a graph. If
I try
> legend(50, 0.1, legend = c(expression(0 <= x <= 1), c(2 <= x <= 3)), pch = c(1,1), col = c(2, 3))
then I get an error message "unexpected '<=' in ...". I've checked the
help files for plotmath and
2006 Sep 22
2
inequality with NA
Dear everybody!
take a<-c(5,3,NA,6).
if(a[1]!=NA){b<-7}
if(a[3]!=5){b<-7}
if(a[3]!=NA){b<-7}
if(a[3]==NA){b<-7}
will alltogeather return
Fehler in if (a[1] != NA) { : Fehlender Wert, wo TRUE/FALSE n?tig ist
(or simularly). Somehow this is logical. But how else should I get out,
whether a certain vector-component has an existing value?
Thank you in advance!
Yours,
Mag. Ferri
2008 Dec 28
1
Logistic regression with rcs() and inequality constraints?
Dear guRus,
I am doing a logistic regression using restricted cubic splines via
rcs(). However, the fitted probabilities should be nondecreasing with
increasing predictor. Example:
predictor <- seq(1,20)
y <- c(rep(0,9),rep(1,10),0)
model <- glm(y~rcs(predictor,n.knots=3),family="binomial")
print(1/(1+exp(-predict(model))))
The last expression should be a nondecreasing
2011 Jul 10
1
Chebyshev Inequality — MVUE
Hello,
I was interested in trying to write an R script to calculate a UCL for a lognormal distribution using the Chebyshev Inequality — MVUE Approach (based on EPA’s guidance found in http://www.epa.gov/oswer/riskassessment/pdf/ucl.pdf). This looks like it should be straight forward, but I am need to calculate an MVUE for the population mean and an MVUE for the population variance, which requires
2009 Jul 17
0
Inequality constraints in GMM estimation?
I have a relatively simple finance application of GMM. Given the moment
condition:
E[m*R]=0
where m=m[theta]
I would like to constrain m>0. Any ideas?
[[alternative HTML version deleted]]
2012 Jul 12
0
Enforcing inequality bounds and heteroscedasticity in a GAM or GLM
I have a spatial salinity field s and a model g(s) ~ Xb where the X comes from slightly modified GAM basis functions.
I am trying to deal with the following set of requirements:
1. The underlying physics are linear, and plain salinity (the identity link) is the correct response to my covariates.
2. Dispersion (variance or sd) is almost certainly proportional to the mean.
3. The data s(x,y)
2009 Mar 15
2
Testing for Inequality à la "select case"
Using R 2.7.0 under WinXP.
I need to write a function that takes a non-negative vector and returns the
parallell maximum between a percentage of this argument and a fixed value.
Both the percentages and the fixed values depend on which interval x falls
in. Intervals are as follows:
>From | To | % of x | Minimum
2004 Oct 27
0
Dovecot mysql authentication
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Helo,
Is somebody able to say me how I can set config files for dovecot to
support $subject.
Thanx a lot
~ Petr
- --
Intelligence is the ability to avoid doing work, yet getting the work
done.
Linus Torvalds
Petr Bartel ICQ 74097173
Irix a.s. e-mail bartel at irix dot cz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5