similar to: Query on constrained regressions using -mgcv- and -pcls-

Displaying 20 results from an estimated 700 matches similar to: "Query on constrained regressions using -mgcv- and -pcls-"

2013 Mar 11
1
Use pcls in "mgcv" package to achieve constrained cubic spline
Hello everyone,          Dr. wood told me that I can adapting his example to force cubic spline to pass through certain point.          I still have no idea how to achieve this. Suppose we want to force the cubic spline to pass (1,1), how can I achieve this by adapting the following code? # Penalized example: monotonic penalized regression spline ..... # Generate data from a monotonic truth.
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)
2013 Jul 19
0
mgcv: Impose monotonicity constraint on single or more smooth terms
Dear R help list, This is a long post so apologies in advance. I am estimating a model with the mgcv package, which has several covariates both linear and smooth terms. For 1 or 2 of these smooth terms, I "know" that the truth is monotonic and downward sloping. I am aware that a new package "scam" exists for this kind of thing, but I am in the unfortunate situation that I am
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
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
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.
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
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:
2003 Jan 30
2
mgcv, gam
Hola! I have some problems with gam in mgcv. Firts a detail: it would be nice igf gam would accept an na.action argument, but that not the main point. I want to have a smooth term for time over a year, the same pattern repeating in succesive years. It would be natural then to impose the condition s(0)=s(12). Is this possible within mgcv? I tried to obtain this with trigonometric terms, aca:
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]]
2008 Jan 28
0
[LLVMdev] 2.2 Prerelease available for testing
Target: FreeBSD 7.0-RC1 on amd64. autoconf says: configure:2122: checking build system type configure:2140: result: x86_64-unknown-freebsd7.0 [...] configure:2721: gcc -v >&5 Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070719 [FreeBSD] [...] objdir != srcdir, for both llvm and gcc. Release
2012 Jul 06
0
[LLVMdev] Exception handling slowdown?
On Jul 5, 2012, at 1:33 AM, Duncan Sands wrote: > Hi Bill, > >> Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? > > I don't see any relevant LLVM changes, so I guess clang C++ compilation slowed > down due to some clang changes. I'm not going to investigate this. > Crumbs. John, Do you know of anything that went into
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
2012 Jun 25
0
[LLVMdev] Exception handling slowdown?
Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? -bw On Jun 20, 2012, at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote: > Did something change with exception handling recently? A bunch of lit bots are > showing slower compile times for many tests. > > Ciao, Duncan. > > On 20/06/12 07:53, llvm-testresults at cs.uiuc.edu
2012 Jul 05
2
[LLVMdev] Exception handling slowdown?
Hi Bill, > Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? I don't see any relevant LLVM changes, so I guess clang C++ compilation slowed down due to some clang changes. I'm not going to investigate this. Ciao, Duncan. > > -bw > > On Jun 20, 2012, at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote: > >> Did
2012 Jun 20
2
[LLVMdev] Exception handling slowdown?
Did something change with exception handling recently? A bunch of lit bots are showing slower compile times for many tests. Ciao, Duncan. On 20/06/12 07:53, llvm-testresults at cs.uiuc.edu wrote: > > lab-mini-03__O0-g__clang_DEV__x86_64 test results > <http://llvm.org/perf/db_default/v4/nts/1283?compare_to=1278&baseline=999> > > Run Order Start Time Duration >
2006 Jul 15
0
How to Interpret Results of Regression in R
----------------------------------------------------------------------------------------------------- Howdy, Gurus I am appying R package for regression analysis as followings. A dependent variable is jhnet that means ratio of dividing internal trip with all trips in a traffic zone. There are many indepentent variables including factor or dummy varibles such as parkfee, ohouse, Devt2, corridor1.
2018 Sep 12
2
How to make LLVM go faster?
Here is some timing information from running the Zig standard library tests: $ ./zig test ../std/index.zig --enable-timing-info Name Start End Duration Percent Initialize 0.0000 0.0010 0.0010 0.0001 Semantic Analysis 0.0010 0.9968 0.9958 0.1192 Code Generation 0.9968 1.4000 0.4032
2003 Sep 26
1
least squares regression using (inequality) restrictions
Dear R Users, I would like to make a lesast squares regression similar to that what is done by the command "lm". But additionally, I would like to impose some restrictions: 1) The sum of all regression coefficients should be equal to 1. 2) Each coefficient should assume a value between 0 and 1. (inequality restrictions) Which command is the best to use in order to solve this problem
2018 Sep 12
2
How to make LLVM go faster?
Thanks, that was a really helpful suggestion. If you're curious- here are some of the high cost areas: ===-------------------------------------------------------------------------=== DWARF Emission ===-------------------------------------------------------------------------=== Total Execution Time: 2.0117 seconds (2.0185 wall clock) ---User Time---