, 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
?
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
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/
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
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
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
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
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
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 "
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
): 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
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
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(
<- 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
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
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
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
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
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(
,"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
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:
=~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
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
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
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
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
#
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
(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
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
_
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
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
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
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
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
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()
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
. 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
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
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
__
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
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
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
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
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
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
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
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,
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
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
), 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
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
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.
>
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
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
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
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
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
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
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
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
--
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
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
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
>
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
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
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
66 matches
Mail list logo