Displaying 20 results from an estimated 20000 matches similar to: "How to add two different axis to one plot?"
2006 Feb 19
3
Changing predictor order in lm()
Dear community,
can anyone provide a snippet of code to force the lm() to fit a model with
terms in the formula in an arbitrary order? I am interested in something
like:
lm(y ~ A * B + C, data=data)
where the interaction of A and B should be in the formula before C. My
goal is to simplify my presentation of models using the anova() statement.
I have found that this should be possible using
2005 Nov 09
2
Sort a dataframe
Dear All,
How can I sort a data frame (using one of the column)?
Thanks for your support.
Regards.
Abd. Rahman Kassim (PhD)
Head Forest Ecology Branch
Forest Management & Ecology Program
Forestry and Conservation Division
Forest Research Institute Malaysia
Kepong 52109
Selangor, Malaysia
*****************************************
Checked by TrendMicro Interscan Messaging Security.
For any
2006 May 16
5
Interrater and intrarater variability (intraclass correlation coefficients)
Hello!
I want to calculate the intra- and interrater reliability of my study. The design is very simple, 5 raters rated a diagnostic score 3 times for 19 patients.
Are there methods/funtions in R? I only found packages to calculate interrater variability and intraclass correlation coefficients for matrices of n*m (n subjects, m raters) - I have n subjects, m raters and r repetitions.
Can
2005 Oct 13
6
shell scripts in R
Hi,
How can I execute some scripts from within R.
I have a large data file which I process (for instance with gawk, but not
only) before performing some statistics.
I would like to do this in R, so that I do not have to save many data files
and then making analysis on them (which proved to be unefficient)
Thank you
Marco Grazzi
2005 Sep 08
1
Creating very small plots (2.5 cm wide) in Sweave
Hi everyone,
I was wondering if anyone has any code they could share for creating
thumbnail plots in Sweave. For example, I'd like a plot like the
following:
y <- c(40, 46, 39, 44, 23, 36, 70, 39, 30, 73, 53, 74)
x <- c(6, 4, 3, 6, 1, 5, 6, 2, 1, 8, 4, 6)
opar <- par(mar=c(3,3,0,0))
plot(x, y, xlab="", ylab="")
abline(h=mean(y), col="red")
par(opar)
2006 Aug 18
3
Query: how to modify the plot of acf
I need to modify the graph of the autocorrelation. I tried to do it through plot.acf but with no success.
1. I would like to get rid of the lag zero
2. I would like to have numbers on the x-axis only at lags 12, 24, 36, 48, 60, ...
Could anybody help me in this?
Any help will be appreciated
Thank you for your attention
Stefano
[[alternative HTML version deleted]]
2006 Feb 10
1
Splitting printed output in Sweave
Dear R community,
I'm trying to figure out if there is any way to split the printed output
of some commands, for example summary.lme, so that I can intersperse
comments in Sweave. I don't mind running the command numerous times and
masking various portions of the output, or saving the output as an object
and printing it, but I can't figure out how to do either. Does anyone
have any
2007 Apr 25
3
aggregate similar to SPSS
Hi,
Does anyone know if: with R can you take a set of numbers and aggregate
them like you can in SPSS? For example, could you calculate the percentage
of people who smoke based on a dataset like the following:
smoke = 1
non-smoke = 2
variable
1
1
1
2
2
1
1
1
2
2
2
2
2
2
When aggregated, SPSS can tell you what percentage of persons are smokers
based on the frequency of 1's and 2's. Can
2007 Mar 16
3
ARIMA standard error
Hi,
Can anyone explain how the standard error in arima() is calculated?
Also, how can I extract it from the Arima object? I don't see it in there.
> x <- rnorm(1000)
> a <- arima(x, order = c(4, 0, 0))
> a
Call:
arima(x = x, order = c(4, 0, 0))
Coefficients:
ar1 ar2 ar3 ar4 intercept
-0.0451 0.0448 0.0139 -0.0688 0.0010
s.e.
2006 Jun 06
1
spatial corStruct in lme
Hi,
I'm fitting a relatively simple growth model to some forest plot data. Two
species of trees were planted in different mixtures in 10 (nearly-adjacent)
plots and measured on four occasions over 10 years. The model is
constructed in terms of the diameter increments (per year; DI) in the 3
intervals, in which DI is modelled as a function of mid-interval D and DSQ.
The details of the
2011 Jun 14
2
Off-topic: (Simple?) Random Sampling when n is a random variable
Hi everyone,
I'm involved in a discussion with a colleague. He suggested a sample
design for a finite-sized process that (to all intents and purposes)
involves tossing a coin and examining the unit if the coin shows
Heads.
I should emphasize that we're both approaching the problem from a
design-based sampling theory point of view. So I have no argument
about the appropriateness of the
2005 Sep 25
2
summary nls output
Dear R user:
I bulid a package, and in the package I use the function "nls"
to solve some questions. If I have two sets of data, and I want to
summary these two data's nls output, I write the command in the
package source code like:
{
..........
summary(fm1)
summary(fm2)
}
then i compiler the package and use "Install package(s) from
local zip files" to install my
2005 Oct 16
1
measurement error model - "simple" linear regression
Dear friends, I found the thread on this subject this summer but
wonder whether it has been taken any further. I have an important
medical problem where X is computed from a three independent and
complicated measurements (exchangeable sodium and potassium and total
body water - i.e. X = (Nae+Ke)/TBW ) and Y is serum sodium
concentration (all data in Edelman, JCI 1958). I have the individual
2008 Jan 14
1
[Off Topic] searching for a quote
Dear community,
I'm trying to track down a quote, but can't recall the source or the
exact structure - not very helpful, I know - something along the lines
that:
80% of [applied] statistics is linear regression ...
?
Does this ring a bell for anyone?
Thanks,
Andrew
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-9763
University of
2007 Mar 08
2
augPred in lmer
I read the posts about augPred with lme, but does anyone know if there is a correlate for augPred for lmer? Specifically, I want to be able to use it to plot projections for all groups in an lmer class object using plot(augPred(lmer.object)).
Thanks,
Kyle
***************************************
J. Kyle Roberts, Ph.D.
Baylor College of Medicine
Center for Educational Outreach
One Baylor Plaza,
2006 Jan 11
2
Problem with making Matrix
Hi R-help citizens,
I'm having trouble making version 0.99-6 of Matrix on FreeBSD 6.0.
The error message is:
* Installing *source* package 'Matrix' ...
** libs
gcc -I/usr/local/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -fPIC -g -O2 -c Csparse.c -o Csparse.o
... numerous lines deleted ...
gcc -I/usr/local/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES
2006 Mar 07
1
Three level linear mixed models
Hello R-users
Is it possible to fit a three level linear mixed effect model in R?
If anyone has an idea or sample code, i will appreciate it very much if i can receive it.
I am reading the book by Pinheiro and Bates but have not come across that yet!
Kind regards
Pryseley
---------------------------------
[[alternative HTML version deleted]]
2006 Mar 22
3
ordering boxplots according to median
Dear R-users,
Does anyone knows how I can order my serie of boxplots from lowest to
highest median (which is much better for visualization purposes).
thanks in advance,
willem
[[alternative HTML version deleted]]
2006 Jun 05
1
Extracting Variance components
I can ask my question using and example from Chapter 1 of Pinheiro & Bates.
> # 1.4 An Analysis of Covariance Model
>
> OrthoFem <- Orthodont[ Orthodont$Sex == "Female", ]
> fm1OrthF <-
+ lme( distance ~ age, data = OrthoFem, random = ~ 1 | Subject )
> summary( fm1OrthF )
Linear mixed-effects model fit by REML
Data: OrthoFem
AIC BIC
2006 Aug 22
1
Marginal Predicitions from nlme and lme4
Is there a way (simple or not) to get the marginal prediction from lme
(in nlme) and/or lmer (in lme4)?
Rick B.