?
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
, 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
telephone +49 551 39 8807
facsimile +49
between GLM and multinom fits:
apply(cbind(ee0,ee1,ee2,ee3),2,mean)
apply(predict(m2,type=probs),2,mean)
#
[using R 3.1.1 on Windows 7 32-bit]
--
PD Dr. Christoph Scherber
Senior Lecturer
DNPW, Agroecology
University of Goettingen
Grisebachstrasse 6
37077 Goettingen
Germany
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 louise.steven...@lifesci.ucsb.edu
Datum: 12.07.2014 22:47 (GMT+01:00)
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 argument
and superpose.symbol
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
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
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 found
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-37077 Goettingen
Germany
phone 0049 (0)551 39 8807
that:
all.equal(crossprod(X), t(X) %*% X)
Cheers,
Joshua
On Tue, Sep 3, 2013 at 2:51 AM, Christoph Scherber
christoph.scher...@agr.uni-goettingen.de wrote:
Dear all,
I´ve played around with the airquality dataset, trying to solve the matrix
equations of a simple
multiple regression by hand
): 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
Department of Crop
=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
--
PD Dr Christoph Scherber
Georg-August
)
plot(y~x0,dat)
mydata=data.frame(x0=0:200/200,x1=mean(dat$x1),x2=mean(dat$x2),x3=mean(dat$x3))
pv - predict(b,mydata,type=response,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
,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() on a fitted model object, I get a nice and
well-looking smooth curve for all
terms in the model
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
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 file with layers using the pdf() device in R
wishes
Christoph
--
Dr. rer.nat. Christoph Scherber
University of Goettingen
DNPW, Agroecology
Grisebachstr. 6
D-37077 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
?
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 NEW POSTAL ADDRESS!*
Dr. rer.nat. Christoph Scherber
University of Goettingen
DNPW, Agroecology
,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 University of Goettingen DNPW,
Agroecology
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(
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
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
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
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
(using R 2.8.0 on Windows XP)
--
Dr. rer.nat. Christoph Scherber
University
)
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
show the difference between glm and transformation
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-project.org mailing
))
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 using the
following code:
# a is the dataframe
. 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 Christoph.Scherber at agr.uni-goettingen.de
writes:
Dear all,
Is there a way to retrieve standard errors from nls models
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 39 8807
fax +49 (0)551 39 8806
Homepage http://www.gwdg.de/~cscherb1
.
---
Christoph Scherber [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
Dear all,
How can I replace text in objects that are of class formula?
y=a * x + b
class(y)=formula
grep(x,y)
y[1]
Suppose I would like to replace the x by w in the formula object y.
How
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()
printed?
Many thanks for any help!
All the best
Christoph
--
Christoph Scherber
Agroecology, Univ. Goettingen
37073 Goettingen
Germany
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
. 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
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
fax +49
for 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
-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, Agroecology
Waldweg 26
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
-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 using linear
mixed
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
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
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,
. 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 mailing list
https
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 following
=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 Lee,
The problem seems
]]
__
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
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.
It
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)
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
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-project.org
)),79)
##
The last two lines of code are what I am stuck with; I thought using
diag() on the SSPH and SSPE matrices should give me the sums of squares
for hypothesis and error; so division should yield the F values?
I would be most grateful for any help!
Best wishes
Christoph
--
Dr. Christoph
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 the
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 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
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])
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 39 8807
fax +49(0)551 39 8806
homepage www.gwdg.de
--
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
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
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
correlations is
another question.
--- Christoph Scherber
[EMAIL PROTECTED] wrote:
Dear John,
Thanks very much for your help; but actually I would
like to have the
colNames and rowNames for the correlations
-such that I can say: Only (a and c ) and (d and f)
were correlated with
r0.6
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.gwdg.de/~cscherb1
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
64 matches
Mail list logo