search for: nknot

Displaying 9 results from an estimated 9 matches for "nknot".

Did you mean: knot
2013 Feb 27
1
Finding the knots in a smoothing spline using nknots
Hi r-helpers. Please forgive my ignorance, but I would like to plot a smoothing spline (smooth.spline) from package "stats", and show the knots in the plot, and I can't seem to figure out where smooth.spline has located the knots (when I use nknots). Unfortunately, I don't know a lot about splines, but I know that they provide me an easy way to estimate the location of local maxima and minima on varying time-scales (number of knots) in my original data. I see there is a fit$knot, but it's not clear to me what those values are: for...
2015 Apr 07
2
Consulta sobre el correcto uso de smoothSpline()
...ar con otras series temporales. Por lo que estuve viendo, me conviene usar la función smoothSpline() que se basa en smooth.spline() del paquete 'stats'. Pero me quedan algunas dudas respecto de los argumentos que se utilizan en ambas funciones. Principalmente, el que más me interesa es 'nknots' y no logro estar seguro de su funcionamiento. Digamos que tengo una serie mensual con 30 años de datos, es decir 360 registros, uno por cada mes. Yo quisiera hacer y comparar distintos suavizados, por ejemplo, "agrupando" de a 6, 12, 24 y 60 meses (perdón pero no sé cuál sería el t...
2006 Mar 17
1
smooth.spline
...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.spline(x,y,all.knots=TRUE) but again got output of length 18 again. I then tried sss <- smooth.spline(x,y,nknots=27) and got an error message. Finally I was inspired to re-scale the x-values. Doing x <- x - min(x) sss <- smooth.spline(x,y) gave me output of length 27 as expected. Apparently smooth.spline() is using a criterion for distinctness of x values which is based on a tolerance relative...
2011 Sep 20
2
Multivariate spline regression and predicted values
..., I could load the 'locfit' package and run (something like): lp.results <- smooth.lf(X,Y,kern="epan",kt="prod",deg=1,alpha=c(0,0.25,0),xev=W,direct=TRUE)$y Or, if X was univariate (ie d=1), I could use (something like): spl.results <- predict(smooth.spline(X,Y, nknots=6),W) But smooth.spline only works for univariate data. I looked at the "crs" package, and it at least will fit the multivariate spline, but I don't see how to predict the new data from this. That is, I run a command like: spl.fit <- crs(Y~X[,1] + X[,2],basis="tensor",...
2011 Apr 28
4
how to generate a normal distribution with mean=1, min=0.2, max=0.8
Dear all, This is a simple probability problem. I want to know, How to generate a normal distribution with mean=1, min=0.2 and max=0.8? I know how the generate a normal distribution of mean = 1 and sd = 1 and with 500 data point. rnorm(n=500, m=1, sd=1) But, I am confusing with how to generate a normal distribution with expected min and max. I expect to hear your directions. Thanks in
2011 Mar 22
1
In ppls package kernel method is unsupported?
require(ppls) data(BOD) X<-BOD[,1] y<-BOD[,2] Xtest=seq(min(X),max(X),length=200) dummy<-X2s(X,Xtest,deg=3,nknot=20) Z<-dummy$Z Ztest<-dummy$Ztest size<-dummy$sizeZ P<-Penalty.matrix(size,order=2) lambda<-200 number.comp<-3 penalized.pls(Z,y,P=lambda*P,ncomp=number.comp)$coefficients # By default kernel=F penalized.pls(Z,y,P=lambda*P,ncomp=number.comp,kernel=TRUE)$coefficients # Same as abo...
2004 Sep 09
2
Rd syntax error detected in CRAN daily checks
...e polynomial, e.g. \code{2} for quadratic (the usual default). For \code{lsp} it is a vector of knot locations (\code{lsp} will not estimate knot locations). For \code{rcs} it is the number of knots (if scalar), or vector of knot locations (if \code{>2} elements). The default number is the \code{nknots} system option if \code{parms} is not given. If the number of knots is given, locations are computed for that number of knots. For \code{catg}, \code{parms} is the category labels (not needed if variable is an S category or factor variable). If omitted, \code{catg} will use \code{unique(x)}, or \c...
2002 Jun 17
5
R-1.5.1 is released
...: - expressions involving dot(<something>) now produce a dot accent above the <something> (initial patch from Ben Bolker). - within an expression, the symbol partialdiff is now converted to a partial differential symbol (greek delta). o smooth.spline() has a new argument `nknots' allowing to set the default number of knots (when `all.knots = FALSE' as per default). BUG FIXES o Rdconv now skips CRs in input files, even on Unix. o readBin() had a (very slow) memory leak if changing size or reading character strings. writeChar() had a memory leak....
2002 Jun 17
5
R-1.5.1 is released
...: - expressions involving dot(<something>) now produce a dot accent above the <something> (initial patch from Ben Bolker). - within an expression, the symbol partialdiff is now converted to a partial differential symbol (greek delta). o smooth.spline() has a new argument `nknots' allowing to set the default number of knots (when `all.knots = FALSE' as per default). BUG FIXES o Rdconv now skips CRs in input files, even on Unix. o readBin() had a (very slow) memory leak if changing size or reading character strings. writeChar() had a memory leak....