Re: [R] Simulate multinomial data

2015-06-29 Thread Christoph Scherber
, Don: > See the combinat package: > > combinat::rmultinomial > Generate random samples from multinomial distributions > > > -Don > -- PD Dr. Christoph Scherber Senior Lecturer DNPW, Agroecology University of Goettingen Grisebachstrasse 6 37077 Goettingen Germany t

[R] Simulate multinomial data

2015-06-29 Thread Christoph Scherber
? ymult=rmultinom(.,) ## Many thanks and best wishes, Christoph [using R 3.1.1 on Windows 7 64-Bit] -- PD Dr. Christoph Scherber Senior Lecturer DNPW, Agroecology University of Goettingen Grisebachstrasse 6 37077 Goettingen Germany telephone +49 551 39 8807 facsimile +49 551 39 8806

Re: [R] Expressing a multinomial GLM as a series of binomial GLMs

2014-07-23 Thread Christoph Scherber
ily = "binomial") r1=predict(g1,type="response") r2=predict(g2,type="response") r3=predict(g3,type="response") # calculate predictions (based on Chapter 8.3 in Dobson 2002, Introduction to GLMs) ee0=1/(1+r1+r2+r3) ee1=r1/(1+r1) ee2=r2/(1+r1+r2) ee3=r3/

Re: [R] R GUI for undergraduate lab class?

2014-07-13 Thread Christoph Scherber
The best GUI I know for such purposes is John Fox 's Rcmdr package. It was built for undergraduate courses. Cheers, Christoph  Von Samsung Mobile gesendet Ursprüngliche Nachricht Von: Louise Stevenson Datum: 12.07.2014 22:47 (GMT+01:00) An: r-help@r-project.org Betreff

Re: [R] lattice : superpose symbols with a great many points

2014-06-22 Thread Christoph Scherber
4 23:09, schrieb Laurent Rhelp: Le 20/06/2014 21:50, Christoph Scherber a écrit : Dear Laurent for numeric x variables, you could try jitter: xyplot(y~jitter(x,0.5)) Cheers Christoph Am 20.06.2014 21:45, schrieb Laurent Rhelp: Hi, I like to use with xyplot (package lattice) the groups arg

Re: [R] lattice : superpose symbols with a great many points

2014-06-20 Thread Christoph Scherber
Dear Laurent for numeric x variables, you could try jitter: xyplot(y~jitter(x,0.5)) Cheers Christoph Am 20.06.2014 21:45, schrieb Laurent Rhelp: Hi, I like to use with xyplot (package lattice) the groups argument and superpose.symbol to compare several curves. But, when there are a grea

Re: [R] How to illustrate an interaction with plotLMER.fnc

2014-05-16 Thread Christoph Scherber
Dear Ulla, Wouldn´t it be more straightforward to use John Fox´s effects package for this? library(effects) plot(effect("variable1:variable2",model)) Best wishes Christoph Am 16.05.2014 16:50, schrieb Haverinen-Shaughnessy Ulla: Hello, I have built a linear mixed model (with lmer). To illu

Re: [R] plot() function: color transparency

2013-12-18 Thread Christoph Scherber
you will need to specify colours as RGB values and then set transparency via the "alpha" argument. e.g.: color=rgb(0,0,0,alpha=0.3) # will give black (0,0,0) and a transparency of 30%. Best wishes Christoph On 18/12/2013 23:23, capricy gao wrote: I checked as you suggested. However, I foun

Re: [R] Multiple regression (with interactions) by hand

2013-09-03 Thread Christoph Scherber
olve(crossprod(X)) %*% t(X) %*% Y > > Note that: > > all.equal(crossprod(X), t(X) %*% X) > > Cheers, > > Joshua > > > > On Tue, Sep 3, 2013 at 2:51 AM, Christoph Scherber > wrote: >> Dear all, >> >> I´ve played around with the "

[R] Multiple regression (with interactions) by hand

2013-09-03 Thread Christoph Scherber
esult (line ginv(...)) not the same as the one returned by coef(m1)? Thanks very much for your help! Best regards, Christoph [using R 3.0.1 on Windows 7 32-Bit] -- PD Dr Christoph Scherber Georg-August University Goettingen Department of Crop Science Agroecology Grisebachstrasse 6 D-3707

[R] MGCV: Degrees of freedom of smooth terms

2013-07-23 Thread Christoph Scherber
): bilinear effect (?) or how would I call this? And what does "ref.df" in the summary output mean; is this the unpenalized degrees of freedom for each term? Thank you very much for answering! Best wishes, Christoph -- PD Dr Christoph Scherber Georg-August University Goettingen Departme

Re: [R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Christoph Scherber
e",se=TRUE) > lines(mydata$x0,pv$fit) > lines(mydata$x0,pv$fit+2*pv$se.fit,lty=2) > lines(mydata$x0,pv$fit-2*pv$se.fit,lty=2) > > > > > On 16/07/13 09:52, Christoph Scherber wrote: >> Dear R users, >> >> I´ve stumbled over a problem that can be eas

Re: [R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Christoph Scherber
pv$se.fit,lty=2) > lines(mydata$x0,pv$fit-2*pv$se.fit,lty=2) > > > > > On 16/07/13 09:52, Christoph Scherber wrote: >> Dear R users, >> >> I´ve stumbled over a problem that can be easily seen from the R code below: >> >> - When I use plot.gam(

[R] MGCV: overlay fitted (marginal) curves over a plot of the original data

2013-07-16 Thread Christoph Scherber
<- gamSim(1,n=400,dist="normal",scale=2) b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat) plot(b,select=1) plot(y~x0,dat) mydata=data.frame(x0=0:1,x1=mean(dat$x1),x2=mean(dat$x2),x3=mean(dat$x3)) lines(0:1,predict(b,mydata,type="response")) ## Best wishes, Christoph -- P

Re: [R] Creating a pdf with layers?

2012-07-20 Thread Christoph Scherber
t would be interesting to be able to divert output to different layers inside a PDF structure. Best regards Christoph Scherber Am 20.07.2012 13:48, schrieb Prof Brian Ripley: > On 20/07/12 12:07, Christoph Scherber wrote: >> Dear all, >> >> Is it possible to create a pdf

[R] Creating a pdf with layers?

2012-07-20 Thread Christoph Scherber
Dear all, Is it possible to create a pdf file with layers using the pdf() device in R? Many thanks for your help! Christoph (using R 2.15.1 on Windows 7 64-Bit) -- PD Dr Christoph Scherber Georg-August University Goettingen Department of Crop Science Agroecology Grisebachstrasse 6 D-37077

[R] Windows 7 issues with installing packages and setting library paths

2011-08-19 Thread Christoph Scherber
nown reasons) What can I do to change the default library installation location? Any help would be greatly appreciated! Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Grisebachstr

[R] Extract Crawley´s datasets and pack them into a new package

2011-01-14 Thread Christoph Scherber
in LL3, how do I move them out to the "data" path in a newly created library? I know that "package.skeleton()" should do the job, but somehow I got stuck here... Many thanks for your help! Best wishes Christoph [using R 2.12.1 on Windows XP] -- *PLEASE NOTE OUR N

Re: [R] Exporting a list of data frames

2010-06-03 Thread Christoph Scherber
Dear all, I found one possible solution using a single call to write.table: # assuming that mylist is a named list of data.frames: data(Orange) mylist=list(Orange1=Orange,Orange2=Orange,Orange3=Orange) sapply(1:length(mylist), function(x){ write.table(

[R] Exporting a list of data frames

2010-06-03 Thread Christoph Scherber
,"mylist.txt") or format (mylist...) But somehow I cannot get the information contained in "mylist" exported in a nicely looking way. Any ideas? Many thanks for any help! Best wishes, Christoph (using R 2.11.0 on Windows XP) -- Dr. rer.nat. Christoph Scherber Universit

[R] contr.sdif from MASS

2009-11-24 Thread Christoph Scherber
Dear all, When using contr.sdif (from MASS), is it true that the *Intercept* is the mean of the response variable *across all levels* of the explanatory variables included in the model? Somehow, it doesn´t seem to be the overall mean. Many thanks for any help! Christoph # Below is an example:

[R] nested, repeated measure lme

2009-08-20 Thread Christoph Scherber
=~time|unique.ID.of.every.individual I have read that (2) is the only approach that works. But how could I then still include the nesting information from (1)? Many thanks for your help! Best wishes Christoph (using R 2.9.0 and the nlme library on Windows XP) -- Dr. rer.nat. Christoph Scherber

[R] stepAICc function (based on MASS:::stepAIC.default)

2009-05-05 Thread Christoph Scherber
Dear all, I have tried to modify the code of MASS:::stepAIC.default(), dropterm() and addterm() to use AICc instead of AIC for model selection. The code is appended below. Somehow the calculations are still not correct and I would be grateful if anyone could have a look at what might be wrong w

[R] stepAICc

2009-04-30 Thread Dr. Christoph Scherber
Dear R users, Would it be difficult to change the code of stepAIC (from the MASS library) to use AICc instead of AIC? It would be great to know of someone has tried this already. Best wishes Christoph. __ R-help@r-project.org mailing list https://stat

[R] Extracting degrees of freedom from a gnls object

2009-01-07 Thread Christoph Scherber
Dear all, How can I extract the total and residual d.f. from a gnls object? I have tried str(summary(gnls.model)) and str(gnls.model) as well as gnls(), but couldn´t find the entry in the resulting lists. Many thanks! Best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of

Re: [R] glm or transformation of the response?

2008-11-25 Thread Christoph Scherber
ot;),lty=1,col="blue") lines(explanatory,predict(model7,data.frame(explanatory=explanatory),type="response"),lty=1,col="green") Peter Dalgaard schrieb: Christoph Scherber wrote: Dear all, For an introductory course on glm?s I would like to create an example to sho

[R] glm or transformation of the response?

2008-11-25 Thread Christoph Scherber
# The only model that performs equally well is model7. How would you deal with this kind of analysis? What would be your recommendation to the students, given the fact that most of the standard glm models obviously don?t seem to produce good fits here? Many thanks and best wishes Christoph

Re: [R] Bootstrapping gnls models

2008-11-07 Thread Christoph Scherber
(model.boot<-boot(rs,model.bootfunc,R=100)) booted<-boot.ci(model.boot,index=1,type=c("norm")) booted$t0 booted$normal ### Best wishes, Christoph. Prof Brian Ripley schrieb: On Fri, 7 Nov 2008, Christoph Scherber wrote: Dear all, I am trying to bootstrap predictions from gnls models us

[R] Bootstrapping gnls models

2008-11-07 Thread Christoph Scherber
k. Does anyone have an idea on that? Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1 _

Re: [R] standard errors for predict.nls?

2008-11-07 Thread Christoph Scherber
the c.i. for the predicted value? Many thanks and best wishes, Christoph Prof Brian Ripley schrieb: On Mon, 3 Nov 2008, Ben Bolker wrote: Prof Brian Ripley wrote: Christoph Scherber agr.uni-goettingen.de> writes: Dear all, Is there a way to retrieve standard errors from nls model

Re: [R] replacing characters in formulae / models

2008-11-06 Thread Christoph Scherber
y[[1]][[2]][[3]] <- as.name("w") w <- 11:20 y eval(y) hth Keith J P.S. Perhaps you really do want a formula; y ~ a*x+b ?? In that case I'd still probably manipulate it as a list. --- "Christoph Scherber" <[EMAIL PROTECTED

[R] replacing characters in formulae / models

2008-11-06 Thread Christoph Scherber
how, the methods that can be used in character objects do not work 1:1 in formula objects... Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 3

Re: [R] standard errors for predict.nls?

2008-11-06 Thread Christoph Scherber
uot;norm")) ### Best wishes Christoph Prof Brian Ripley schrieb: On Mon, 3 Nov 2008, Ben Bolker wrote: Prof Brian Ripley wrote: Christoph Scherber agr.uni-goettingen.de> writes: Dear all, Is there a way to retrieve standard errors from nls models? The help page tells me that argument

[R] standard errors for predict.nls?

2008-11-03 Thread Christoph Scherber
Dear all, Is there a way to retrieve standard errors from nls models? The help page tells me that arguments such as se.fit are ignored... Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen

Re: [R] how to store lme/lmer fit result

2008-11-03 Thread Christoph Scherber
Dear Julia, I think the best thing to do is to save your workspace, including all your objects. This works conveniently using the drop-down menu on Windows. Alternatively, you can use sink(), for example using the Windows clibboard: sink("clipboard") summary(...) # your object(s) here sink()

[R] Problem with error handling inside a function

2008-10-25 Thread Dr. Christoph Scherber
code run, so that the nonlinear models are "skipped" and the extracted.AICs are still printed? Many thanks for any help! All the best Christoph -- Christoph Scherber Agroecology, Univ. Goettingen 37073 Goettingen Germany __ R-help@r-project.org mailin

[R] A covariate correlated with other explanatory variables

2008-10-17 Thread Christoph Scherber
. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1 __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] An AIC model selection question

2008-10-02 Thread Christoph Scherber
ad, simply because it uses up less df and the delta-AIC between model2 and model3 is just 1? Many thanks for any suggestions/comments! Best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807

[R] Minimizing both AIC and df in model selection

2008-10-01 Thread Christoph Scherber
your help! Best wishes, Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1 __ R-help

Re: [R] lme questions re: repeated measures & covariance structure

2008-08-22 Thread Christoph Scherber
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. . -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agro

Re: [R] summary.lme and anova question

2008-08-21 Thread Christoph Scherber
ng at the (marginal) t-tests for any other coefficient than the third-order interaction violates the marginality principle. And the third-order interaction seems to be important. On Thu, 21 Aug 2008, Christoph Scherber wrote: Dear all, When analyzing data from a climate change experiment

[R] summary.lme and anova question

2008-08-21 Thread Christoph Scherber
Dear all, When analyzing data from a climate change experiment using linear mixed-effects models, I recently came across a situation where: - the summary(model) showed a significant difference between the levels of a two-level factor, - while the anova(model) showed no significance for that fa

[R] Interactive plot using playwith() and abline

2008-07-25 Thread Christoph Scherber
Dear all, Is it possible to use abline() after calling playwith(plot(...)))? x=1:10 y=x^2 playwith(plot(x,y)) # works fine playwith({abline(lm(y~x))}) # doesn?t work Thanks! Christoph __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

[R] Three contrast matrices on the same linear model

2008-07-25 Thread Christoph Scherber
Christoph (using R 2.7.1 on Windows XP) -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1

Re: [R] What is wrong with this contrast matrix?

2008-07-24 Thread Christoph Scherber
tests" for me if my contrast matrix is orthogonal or not. Is there some built-in function in R for that? Best wishes Christoph. On 24-Jul-08 15:30:57, Christoph Scherber wrote: Dear all, I am fitting a multivariate linear model with 7 response variables and 1 explanatory variable. The

[R] What is wrong with this contrast matrix?

2008-07-24 Thread Christoph Scherber
sing R 2.7.1 on Windows XP) -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1 __ R-help@r-proj

Re: [R] Functions similar to step() and all.effects() that work for lme() objects?

2008-07-24 Thread Christoph Scherber
Dear Jon, The function stepAIC() in Venable´s & Ripley´s MASS library does the job. Best wishes Christoph Jon Zadra schrieb: Hello, I make frequent use of the *step()* and, for plotting, *all.effects() *functions for *lm()* objects. I am now doing more with *lme()* random effects models,

Re: [R] lmer model with continuos non normal response variable, transformation needed?

2008-07-24 Thread Christoph Scherber
Dear Arams, I would suggest to use lme() instead of lmer(), and then to use a variance function to model the heteroscedasticity in the within-group errors, such as: model.new=update(model,weights=varPower(form=~primary.covariate)) where model and model.new are lme fits, and primary.covariate

Re: [R] lm() question

2008-07-17 Thread Christoph Scherber
ne: (406) 994-6643 fax: (406) 994-7479 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, s

Re: [R] Problems with lm()

2008-07-17 Thread Christoph Scherber
), period=as.factor(c), sequence=as.factor(d), Max=e) lm3<- lm(Max ~ subject*sequence + period + drug+sequence , data=KK) print(lm3) anova(lm3) However, it can not work!! So, where is the problems? Do I misunderstand what you mean? Best regards, Hsin-Ya Dr. Christoph Scherber wrote: Dear Hsin-Ya

Re: [R] The Green Book and its relevance to R

2008-06-21 Thread Dr. Christoph Scherber
Dear Ben, Do you mean "Statistical Computing" by Crawley? In that case, there is a web appendix showing some differences between R and S-Plus. There is also John Fox´s Book "Companion to Applied Linear Regression" that compares R and S-Plus, and Richard Heiberger´s book (Heiberger & Holland) comp

Re: [R] Problems with lm()

2008-06-21 Thread Dr. Christoph Scherber
Dear Hsin-Ya, Then it might be that you have checked "Type 3 sums of squares" in SPSS, while R uses type 1 by default. > > Dear Dr. Andrew Robinson: > > Thanks for your reply. In my data, subject is nested within sequence. > According to Dr. Christoph's reply, I have change the sequence data. >

Re: [R] Problems with lm()

2008-06-19 Thread Christoph Scherber
Dear Hsin-Ya Lee, The problem seems to be that every subject always only received one sequence: sequence subject 1 2 1 0 2 2 2 0 3 0 2 4 2 0 5 0 2 6 2 0 7 0 2 8 2 0 9 0 2 10 2 0 11 0 2 12 2 0 13 0 2 14 2 0 You

[R] Nonlinear multivariate regression

2008-06-18 Thread Christoph Scherber
Windows XP) -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1 __ R-help@r-project.org

[R] Multivariate LM: calculating F-values after calling linear.hypothesis

2008-06-07 Thread Dr. Christoph Scherber
es Christoph -- Dr. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen, Germany www.gwdg.de/~cscherb1 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] problem pasting into Illustrator CS2

2008-06-04 Thread Dr. Christoph Scherber
Dear Courtney, Are you exporting the graphs as postscript files? This is the usual way I do it when moving graphs between R and Illustrator CS2. I´m afraid I do not have a Mac, but I suppose CS2 runs similarly on both systems. Best wishes Christoph > To Whom it May Concern: > I have been using

[R] Comparing two regression lines

2008-06-04 Thread Christoph Scherber
Dear R users, Suppose I have two different response variables y1, y2 that I regress separately on the same explanatory variable, x; sample sizes are n1=n2. Is it legitimate to compare the regression slopes (equal variances assumed) by using lm(y~x*FACTOR), where FACTOR gets "y1" if y1 is th

Re: [R] Rotated text on a regression line

2008-05-27 Thread Dr. Christoph Scherber
Thanks to all for the postings so far! I found that setting asp=0.5 and then dividing the slope by 2 seems to do the trick: ## x=1:10 y=x*2-rnorm(1:10) plot(x,y,pch=16,asp=0.5) abline(lm(y~x)) yval=predict(lm(y~x),list(x=rep(2,length(x[1] slope=as.numeric(lm(y~x)[[1]][2]) text(2,yval,"Regre

[R] Rotated text on a regression line

2008-05-27 Thread Dr. Christoph Scherber
Dear all, I stumbled over a problem recently when trying to use srt with text() on a windows device. What I intended to do was to plot a simple regression line, and to rotate a piece of text such that the text has the same angle as the regression line. However, the text is always plotted in a sl

[R] Simultaneously summarizing many models

2008-02-22 Thread Christoph Scherber
ut I don´t know how to construct m1, m2... without the quotation marks. Thanks very much for your help! Best wishes, Christoph (using R 2.5.1 on Windows XP SP2) -- Dr. Christoph Scherber DNPW, Agroecology University of Goettingen Waldweg 26 D-37073 Goettingen Germany phone +49(0)551

Re: [R] how to generate sequence "a" - "z"

2008-01-29 Thread Christoph Scherber
-- X-USF-Spam-Status: hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Hello, Sequences of letters can be generated by typing LETTERS #for capital letters or letters #for small letters Best wishes Christoph skestin schrieb: > I suppose it's very simple but I can't find the way to generate a sequ

Re: [R] Extract correlations from a matrix

2007-11-09 Thread Christoph Scherber
m,use="pairwise.complete.obs")) ;w > ww <- which(w>0.6 & w!=1,arr.ind=TRUE); ww > z <- w[w>.6 & w!=1] > > cbind(ww,z) > > Exactly how you eliminate duplicate correlations is > another question. > > > --- Christoph Scherber > <[EMAIL

Re: [R] multcomp and lme4

2007-11-09 Thread Christoph Scherber
Hi all, I would also be very interested in a solution to that (although I know that using orthogonal contrasts is usually the method of choice) All the best Christoph Andrew Dolman schrieb: > Dear list members, > > Can anyone please point to an example of how to use glht(multcomp) with lmer >

Re: [R] F distribution from lme()?

2007-11-09 Thread Christoph Scherber
Dear Bill Venables, Does this mean that in a conventional aov object, the "summary.lm" gives the parameter estimates and p-values computed "marginally", while the "summary.aov" table by default gives sequential sums of squares? This question arose recently when a colleague and I were discussing

[R] Extract correlations from a matrix

2007-11-08 Thread Christoph Scherber
d I can´t find a way around it. I would very much appreciate any help! Best wishes Christoph (using R 2.5.1 on Windows XP) -- Dr. Christoph Scherber DNPW, Agroecology University of Goettingen Waldweg 26 D-37073 Goettingen Germany phone +49(0)551 39 8807 fax +49(0)551 39 8806 homepage www.g

[R] detrending a time series

2007-10-10 Thread Christoph Scherber
Dear R users, I am trying to ´detect´ the trend in an artificial time series created by the simple function x=seq(pi,10*pi,0.1) my.ts=0.1*x+sin(x) my.ts=ts(my.ts,start=1800) plot(my.ts) I have tried stl(my.ts), but because I don´t have ´replications´ at every time point, this somehow doesn´t