Displaying 20 results from an estimated 4696 matches for "smooth".
2003 Jun 26
2
Change default parameters of panel.smooth
Hello,
can anyome tell me how to access the full script of the panel.smooth function so that I can change the thickness of the smoothing line or its colour ?
All I could access is :
> panel.smooth
function (x, y, col = par("col"), bg = NA, pch = par("pch"),
cex = 1, col.smooth = "red", span = 2/3, iter = 3, ...)
{
points(x, y, pc...
2009 Sep 24
1
basic cubic spline smoothing
Hello,
I come from a non statistics background, but R is available to me,
and I needed to test an implementation of smoothing spline that I have
written in c++, so I would like to match the results with R (for my unit
tests)
I am following
http://www.nabble.com/file/p25569553/SPLINES.PDF SPLINES.PDF
where we have a list of points (xi, yi), the yi points are random such that:
y_i = f(x_i) + e_i
where e_i is normal...
2010 Nov 01
6
connecting points into a smooth curve
If I have, say, five scatter points and want to connect them together into a
smooth curve.
I did plot(x,y,type="l"), but the graph is five segments connecting with
each other, but not a smooth curve.
I wonder if there is a line type that is a curve. Thanks!
--
View this message in context: http://r.789695.n4.nabble.com/connecting-points-into-a-smooth-curve-tp3021796p...
2007 Apr 13
2
Difficulty with formatting scatter.smooth output
Hello,
I have been using scatter.smooth and been trying to format my plots
and been unable to adjust the line type or color of the smooth curve.
When I specify col in scatter.smooth, I can adjust the color of the
scatter plot points, but the line always stays black and solid. lty
has no effect.
When I specify par prior to calling...
2007 Jul 04
3
Problem/bug with smooth.spline and all.knots=T
Dear list,
if I do
smooth.spline(tmpSec, tmpT, all.knots=T)
with the attached data, I get this error-message:
Error in smooth.spline(tmpSec, tmpT, all.knots = T) :
smoothing parameter value too small
If I do
smooth.spline(tmpSec[-single arbitrary number], tmpT[-single arbitrary number], all.knots=T)
it works!
I...
2010 Sep 08
1
pairs and panel.smooth for two groups
...SJudgeRatings[,1:4]
USJudgeRatings$group <- factor(c(rep(1, 22), rep(0, 21)))
# I can draw a pairs graph where members of each group are drawn in
different colors:
pairs(USJudgeRatings[,1:4], col = c(2,3)[USJudgeRatings$group], pch =
c(21,3)[USJudgeRatings$group])
# I would also like to add a smooth line to each subplot like
pairs(USJudgeRatings[,1:4], panel=panel.smooth)
# but I want the smooth to be done for each of the group, i.e. I want
two smooths per subplot.
# this creates only one smooth
pairs(USJudgeRatings[,1:4], col = c(2,3)[USJudgeRatings$group], pch =
c(21,3)[USJudgeRatings$grou...
2007 Nov 27
2
measure smoothness
I have 3 sets of Cartesian data, one is 'original' data and the other
2 are "smoothed"data. The smoothed data is the result of applying a
smoothing algorithm to the original.One set of smoothed data is the
'old' algorithm and the other set is the 'new' algorithm.
Does R have the capability of telling me which data is "smoother"?
Example data (subse...
2010 Apr 14
1
Selecting derivative order penalty for thin plate spline regression (GAM - mgcv)
Hi,
I am using GAMs (package mgcv) to smooth event rates in a penalized regression setting and I was wondering if/how one can
select the order of the derivative penalty.
For my particular problem the order of the penalty (parameter "m" inside the "s" terms of the formula argument) appears to
have a larger effect on...
2010 Apr 02
4
Derivative of a smooth function
Dear All,
I've been?searching for?appropriate codes to compute the rate of change and the curvature?of ?nonparametric regression model whish was denoted by a smooth function?but?unfortunately?don't manage to?do?it. I presume that such characteristics from a smooth curve can be determined by the first and second derivative operators.
The following are the example of fitting a nonparametric regression model via smoothing spline function from the Help file i...
2009 Aug 06
1
Time Series smoothing
I have a set of data (in a matrix). I spliced a column out and parsed it
as.ts (time series). I then plotted the time series but I found that it was
very noisy. I wanted to smooth it out. However, I am having some problems
smoothing and plotting the smoothed version.
> A <- as.ts(read.table(choose.files()))
> x <- as.ts(A[,10])
> plot(x)
> > plot(smooth(x))
plot(smooth(x)) looks exactly like plot(x). Also,
> StructTS(x)
Error in optim(init[mask...
2012 Apr 25
1
random effects in library mgcv
...if I use a variable x3 instead of x2 in a model, it can change from p-value=NA to p-value=1. Does anyone know what can be happening?
3)Third question: Not linked to random effects but rather to what the two models gm and gm1 are actually testing. From my understanding, the first model creates a 2d-smooth for each level of my factor variable and test whether those smooth are significantly different from a straight line. The second model, also creates 3 smooth: one for the reference level of my Factor variable (group0), one showing the difference between the reference smooth and the smooth for group1...
2013 Feb 28
2
predict.smooth.Pspline function not found
...t some functions from the "Pspline" package are
successfully installed while others are not. The code with which I'm
working is more complicated, but the following highlights my problem. If I
run the following code
> tt <- seq (0,1,length=20)
> xt <- tt^3
> fit <- smooth.Pspline (tt, xt, norder=3,spar=0.0001, method=1)
> pred<- predict.smooth.Pspline (fit, tt, nderiv=0)
I get this error:
"Error: could not find function "predict.smooth.Pspline" "
So it seems like "smooth.Pspline" is loading but "predict.smooth.Pspline"...
2011 Dec 18
1
Smoothing spline with smoothing parameters selected by "generalized maximum likelihood"
Hi there,
How may I smooth spline two vectors with the smoothing parameter selected
by generalized maximum likelihood (GML) .?
Thanks a lot.
--
View this message in context: http://r.789695.n4.nabble.com/Smoothing-spline-with-smoothing-parameters-selected-by-generalized-maximum-likelihood-tp4210679p4210679.html
Sent from...
2005 Feb 10
2
rewrite of scatter.smooth to handle NAs
I rewrote scatter.smooth to handle missing values, but I have a question
about a move I had to make. Here's the code:
Mscatter.smooth<-function (x, y, span = 2/3, degree = 1, family =
c("symmetric",
"gaussian"), xlab = deparse(substitute(x)), ylab =
deparse(substitute(y)),
ylim = r...
2012 Jan 09
1
What is the function for "smoothing splines with the smoothing parameter selected by generalized maximum likelihood?
Dear all,
I am new to R, and I am a biotechnologist, I want to fit a smoothing spline
with smoothing parameter selected by generalized maximum likelihood. I was
wondering what function implement this, and, if possible how I can find the
fitted results for a certain point (or predict from the fitted spline if
this is the correct language)
--
View this message in context:...
2008 Feb 25
1
r44608 fails make check-all in scatter.smooth example
...2
Interfaces supported: X11, tcltk
External libraries: readline
Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo
Options enabled: shared BLAS, R profiling, Java
Recommended packages: yes
R compiled OK, but make check-all fails running the scatter.smooth example:
running code in 'stats-Ex.R' ...make[4]: *** [stats-Ex.Rout] Error 1
make[4]: Leaving directory `/home/gavin/R/devel/build/tests/Examples'
make[3]: *** [test-Examples-Base] Error 2
make[3]: Leaving directory `/home/gavin/R/devel/build/tests/Examples'
make[2]: *** [test-Exa...
2006 Mar 17
1
smooth.spline
I have noticed a slightly puzzling behaviour exhibited by
smooth.spline(). If I do
sss <- smooth.spline(x,y)
for a certain pair of data vectors x and y, and then do
length(sss$x)
I get the result ``18''. However if I do
length(unique(x))
I get ``27''. Trying to force smooth.spline() to use more knots I
tried
sss <- smooth.spli...
2011 Aug 25
3
Application of results from smooth.spline outside R
Hi,
I want to use the result from smooth.spline outside R.
I take my data ,which is 180 point stored in x and y
s <- smooth(x,y)
I can know use to e.g. find the interpolated value at e.g. x=500
predict (s,500)
My problem is, that i don't know how to implement the predict function. I
have looked at literature, but i cannot conn...
2003 May 23
2
predict.smooth.spline
I'm using R 1.7.0 on linux. With this version of R the package modreg is
automatically loaded at start of session. However attempting to use
predict.smooth.spline() produces Error: couldn't find function
predict.smooth.spline.
The function smooth.spline() is OK. What am I missing?
======================================
I.White
ICAPB, University of Edinburgh
Ashworth Laboratories, West Mains Road
Edinburgh EH9 3JT
Fax: 0131 650 6564 Tel: 0131 65...
2006 Jun 24
3
getting the smoother matrix from smooth.spline
Can anyone tell me the trick for obtaining the smoother matrix from smooth.spline when there are non-unique values for x. I have the following code but, of course, it only works when all values of x are unique.
## get the smoother matrix (x having unique values
smooth.matrix = function(x, df){
n = length(x);
A = matrix(0, n, n);
for(i in 1:n)...