similar to: Piecewise Linear Regression

Displaying 20 results from an estimated 700 matches similar to: "Piecewise Linear Regression"

2005 May 30
3
Piecewise Linear Regression
Hi, I need to fit a piecewise linear regression. x = c(6.25,6.25,12.50,12.50,18.75,25.00,25.00,25.00,31.25,31.25,37.50,37.50,50.00,50.00,62.50,62.50,75.00,75.00,75.00,100.00,100.00) y = c(0.328,0.395,0.321,0.239,0.282,0.230,0.273,0.347,0.211,0.210,0.259,0.186,0.301,0.270,0.252,0.247,0.277,0.229,0.225,0.168,0.202) there are two change points. so the fitted curve should look like \ \ /\
2009 Jun 19
1
result of rqss
Hello, i have the following data: x=c(0,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.25,0.26,0.27,0.46,0.47,0.48,0.49) y=c(0.48,0.46,0.41,0.36,0.32,0.35,0.48,0.47,0.55,0.56,0.54,0.67,0.61,0.60,0.54,0.51,0.45,0.42,0.44,0.46,0.41,0.43,0.43,0.48,0.48,0.47,0.39,0.37,0.32,0.29) and tried to get piecewise linear regression. Doing a
2009 Apr 11
1
data argument and environments
I'm having difficulty with an environmental issue: I have an additive model fitting function with a typical call that looks like this: require(quantreg) n <- 100 x <- runif(n,0,10) y <- sin(x) + rnorm(n)/5 d <- data.frame(x,y) lam <- 2 f <- rqss(y ~ qss(x, lambda = lam), data = d) this is fine when invoked as is; x and y are found in d, and lam is found the
2009 Jun 24
2
Memory issues on a 64-bit debian system (quantreg)
Rers: I installed R 2.9.0 from the Debian package manager on our amd64 system that currently has 6GB of RAM -- my first question is whether this installation is a true 64-bit installation (should R have access to > 4GB of RAM?) I suspect so, because I was running an rqss() (package quantreg, installed via install.packages() -- I noticed it required a compilation of the source) and
2006 Feb 05
1
how to extract predicted values from a quantreg fit?
Hi, I have used package quantreg to estimate a non-linear fit to the lowest part of my data points. It works great, by the way. But I'd like to extract the predicted values. The help for predict.qss1 indicates this: predict.qss1(object, newdata, ...) and states that newdata is a data frame describing the observations at which prediction is to be made. I used the same technique I used
2005 Jul 13
3
How to increase memory for R on Soliars 10 with 16GB and 64bit R
Dear all, My machine is SUN Java Workstation 2100 with 2 AMD Opteron CPUs and 16GB RAM. R is compiled as 64bit by using SUN compilers. I trying to fit quantile smoothing on my data and I got an message as below. > fit1<-rqss(z1~qss(cbind(x,y),lambda=la1),tau=t1) Error in as.matrix.csr(diag(n)) : cannot allocate memory block of size 2496135168 The lengths of vector x and y are
2003 Mar 10
4
terms.formula
I'm in the very initial stage of expanding the formula processing in my quantile regression function rq() to handle additive nonparametric components, say qss(x), or qss(x,z). I need some advice about strategy for formula processing. My initial foray was to use: terms(formula,specials="qss") and then modify the components of the resulting terms.object. But in changing formula
2007 Aug 30
3
piecewise linear approximation
Dear list, I have a series of data points which I want to approximate with exactly two linear functions. I would like to choose the intervals so that the total deviation from my fitted lines is minimal. How do I best do this? Thanks! Kamila The information transmitted in this electronic communication...{{dropped}}
2010 May 24
0
breakpoints in rqss()
Dear list, I used rqss() in quantreg package for a piecewise linear regression. Can someone tell me how to find the x values corresponding to the breakpoints and the slopes for the phases before and after the breakpoints? I searched the list and gather that there is another package "segmented" that does that, but my stat is pathetic, and I have difficulty setting the parameters right
2020 Oct 23
0
formula mungeing
Recursively walk the formula performing the replacement: g <- function(e, ...) { if (length(e) > 1) { if (identical(e[[2]], as.name(names(list(...))))) { e <- eval(e, list(...)) } if (length(e) > 1) for (i in 1:length(e)) e[[i]] <- Recall(e[[i]], ...) } e } g(f, lambdas = 2:3) ## y ~ qss(x, lambda = 2L) + qss(z, 3L) + s On Fri, Oct
2020 Oct 23
3
formula mungeing
Suppose I have a formula like this: f <- y ~ qss(x, lambda = lambdas[1]) + qss(z, lambdas[2]) + s I?d like a function, g(lambdas, f) that would take g(c(2,3), f) and produce the new formula: y ~ qss(x, lambda = 2) + qss(z, 3) + s For only two qss terms I have been using g <- function(lambdas, f){ F <- deparse(f) F <- gsub("lambdas\\[1\\]",lambdas[1],F) F
2006 Jun 13
0
rqss.object
Hello, I am a new user and I am looking for the description of the output of rqss function (Additive Quantile Regression Smoothing). It is supposed to be in rqss.object but I could not find any reference to rqss.object anywhere. thanks a lot. Julia [[alternative HTML version deleted]]
2003 Sep 01
0
Quantile Regression Packages
I'd like to mention that there is a new quantile regression package "nprq" on CRAN for additive nonparametric quantile regression estimation. Models are structured similarly to the gss package of Gu and the mgcv package of Wood. Formulae like y ~ qss(z1) + qss(z2) + X are interpreted as a partially linear model in the covariates of X, with nonparametric components defined as
2009 Mar 25
1
Piecewise
Hi, I am a biologist (relatively new to R) analyzing data which we predict to fit a power function. I was wondering if anyone knew a way to model piecewise functions in R, where across a range of values (0-x) the data is modeled as a power function, and across another range (x-inf) it is a linear function. This would be predicted by one of our hypotheses, and we would like to find the AICs
2009 Aug 05
1
regarding Rglpk loading
Hi everybody, I installed Rglpk package from local zip files. Then I tried to load the package in a R session. But R shows following message. Loading required package: slam Error: package 'slam' could not be loaded In addition: Warning message: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) : there is no package called 'slam' Hence, the
2012 Mar 25
2
Simple question regarding domain restrictions/piecewise functions in R
I am a novice R user. I would like to be able to graph some simple piecewise functions/functions with domain restrictions in R, but I'm having trouble defining such functions. For example, I would like to define the following function: f(x)={x^2 if -1<x<x; 1 if 2<x<3} Notably, the function is undefined outside of domain (-1,1)U(2,3). My best attempt in R is something like
2007 May 08
1
Piecewise cubic Hermite interpolation
Which function implements the piecewise cubic Hermite interpolation? I am looking for equivalent of matlab's interp1 with the method = 'pchip' Here is the reference http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/interp1.html& -- View this message in context:
2010 Jul 21
0
Piecewise regression using lme()
Hi everyone, I'm trying to fit a of piecewise regression model on a time series. The idea is to divide the series into segments and then to apply linear regression models on each segment but in a "global way" and considering heteroskedasticity between the segments. For example, I build a time series y with 3 segments: segment1=1:20+rnorm(20,0,2) segment2=20-2*1:30+rnorm(30,0,5)
2012 Jun 05
1
Piecewise Lasso Regression
Hi All, I am trying to fit a piecewise lasso regression, but package Segmented does not work with Lars objects. Does any know of any package or implementation of piecewise lasso regression? Thanks, Lucas
2000 Jul 27
1
Interpolation using a piecewise linear function in higher dimensions
Dear all, I am just wondering if anybody has implemented a function that can give a piecewise linear interpolation in more than 2 dimensions? I have looked at the akima package, but I would rather like a piecewise linear interpolation rather than a spline and while it did the job quite satisfactory for 2 dimensions, I need to interpolate in at least three dimensions. If anybody has implemented