Displaying 20 results from an estimated 2000 matches similar to: "Help using smooth.spline with zoo object"
2001 Dec 13
1
Code for Hodrick-Prescott Filter: Special Case of smooth. spline?
I've had a play with this and, due to my own short-comings, remain none the
wiser.
In particular, I'm not sure what value of 'spar' is consistent with the
magic lambda=1/1600 for quarterly data.
I initially interpreted spar as lambda and tried setting spar=1/1600. This
results in almost no smoothing while spar=1600 causes an error. The
smooth.spline function seems to want
2002 Jul 08
0
Hodrick-Prescott-Filter as smooth.spline
Could someone, please, write me, how to compute the spar-value for the
smooth.spline-routine to get the same HP-filtered time-series with a
parameter lambda for a function (see mail "Hodrick-Prescott-Filter
example" from ggrothendieck at yifan.net):
hpf <- function(y,lambda{
eye <- diag(length(y))
d <- diff(eye,d=2)
z <- solve(eye+lambda*crossprod(d),y)}
?
Second, is
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 just don't see it. It works for hundrets other datasets, but not for
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) +
2009 Nov 17
1
How to do Hodrick-Prescott Filter in R?
Dear All,
How to do Hodrick-Prescott Filter in R?
Thanks!
[[alternative HTML version deleted]]
2001 Dec 05
1
Code for Hodrick-Prescott Filter
Has anyone written any code for the Hodrick-Prescott filter? I have a some
uncompiled FORTRAN code from Ed Prescott but I'd like to save myself some
programming time if possible. Thanks for your help.
Nick Davis
Crown Financial Policy
Asset and Liability Management Branch
The New Zealand Treasury
Direct: +64-4-471-5924
Fax: +64-4-499-0143
Email:
2004 Nov 08
1
how lambda is computed in smoot.spline given _df_
Hi,
I posted some days ago a question concerning the computation of lambda in the smooth.spline function (which I repreat at the bottom of the mail) given _df_ .
Unfortunately the documentation is not clear to me. Maybee someone can help to answer in my view the basic question:
If the penalized log likelihood is L = (y - f)' W (y - f) + lambda c' Sigma c
how the _lambda_ in the above
2004 Mar 03
8
need help with smooth.spline
Dear R listers,
When using smooth.spline to interpolate data, results are generally
good. However, some cases produce totally unreasonable results.
The data are values of pressure, temperature, and salinity from a
probe that is lowered into the ocean, and the objective is to
interpolate temperature and salinity to specified pressures. While
smooth.spline provides excellent values at the
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
2009 Feb 26
2
Importing zoo object ("index contains NAs")
Dear list,
I have an irregular time series saved and exported as a zoo object. What is the trick to force zoo to ignore the missing dates when reading it back in? Thanks.
> str(g)
?zoo? series from 1948-11-02 to 2012-11-06
Data: num [1:14881, 1:8] 1 0 0 0 0 0 0 0 0 0 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:8] "session" "midterm"
2013 Feb 28
2
predict.smooth.Pspline function not found
I have a simple question that irritatingly I haven't been able to figure
out on my own. It seems that 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
2009 Apr 02
1
Time series analysis with irregular time-series
Dear R users
I am currently investigating time series analysis using an irregular time series. Our study is looking at vegetation change in areas of alien vegetation growth after clearing events. The irregular time series is sourced from Landsat ETM+ data, over a six year period I have 38 scenes. For certain periods I have monthly data while for others, images are up to three months apart. So far
2006 Nov 25
2
predict and arima
Hi all,
Forecasting from an arima model is easy with predict.
But I can't manage to backcast : invent data from the model before the
begining of the sample.
The theory is easy : take your parameters, reverse your data, forecast, and
then reverse the forecast
I've tried to adapt the predict function to do that (i'm not sure that the
statistical procedure is fine (with the residuals),
2008 Feb 14
1
Winbind problem with more details.
Everyone,
One of our developers was kind enough to insert some bug checking into the mod_auth_pam and mod_auth_sys_group so that we could see a little more of what was going on with our authentication failures. Here is what we just saw. Two of our users NA\connelmp and NA\guminssa both started getting messages that they were not part of the required group. Here is the log for
2009 Sep 24
0
basic cubic spline smoothing (resending because not sure about pending)
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 Smoothing Splines, D.G. Pollock (available online)
where we have a list of points (xi, yi), the yi points are random such that:
y_i = f(x_i) + e_i
2009 Jun 23
1
How to find b entries using xPath?
We got all rows by:
library(XML)
doc =
htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm')
rows = xpathSApply(doc, '//table/tbody/tr')
The last row is:
row_last = rows[15]
row_last
[[1]]
<tr><td id="t1stub17" class="stub1 RGBShade"><b>Unsmoothed composite
leading indicator</b></td>
<td
2002 Nov 25
2
Pspline smoothing
Dear all,
I'm trying to use the Pspline add-on package to fit a quintic spline
(norder =3), but I keep running into a Singularity error.
> traj.spl <- smooth.Pspline(time, x, norder=3 )
Error in smooth.Pspline(time, x, norder = 3) :
Singularity error in solving equations
>
Playing around with the other parameters produces an "unused arguments" error:
> traj.spl
2006 Apr 27
4
how to make views changable
Hello
I need to make site views changeable
I found how to change layouts but it is not enough, becouse templates
can use different ways to display and organize content.
I found one way to do this, but i need to make subfolders in my
''view/layouts'', ''view/controller_name'' both and to create additional
subfolder somewhere in ''public'' to put
2006 Nov 03
4
read file problem
R-help,
I have the following file I want to import to R (some lines
removed)
Calibrated CTD data for station:00280001
Calibrated:23/8 2001, Salinity Unsmoothed, Fluorescence Uncalibrated
Maximum observed depth: 36 m
QUAL has one digit for each of pressure, temp., sal. and fluor.
QUAL=1:Uncal., QUAL=2:OK, QUAL=6:Interp., QUAL=9:No data
2009 Mar 23
2
Efficiently create dummy
What's the neat way to create a dummy from a list?
The code below is not replicable, but hopefully self-explanatory...
d$treatment<-rep(1,length(d))
notreat<-c("AR", "DE", "MS", "NY", "TN", "AK", "LA", "MD", "NC", "OK", "UT", "VA")
#i would really like this to work: