Displaying 20 results from an estimated 20000 matches similar to: "Changing predictor order in lm()"
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 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
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 Jan 30
2
How to add two different axis to one plot?
Hi all,
I need to put two different axis to one plot. On the top of the plot, I need
to put one axis, with increments from left side to the right side; then at
the bottom of the same plot, I need to put another axis, with increments
from right side to the left side and showing a different unit. How do I do
that?
By the way, is there a "hold" command for plotting?
If I first plot a
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
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
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
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.
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
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
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
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
2013 Jan 17
2
Explore patterns with GAM
Dear all,
I new to r and I would like your help.
I want to explore the patterns (unimodal, monotonically increased/decreased)
of species richness~altitude using GAM in R. Although I run the gam function
in mgcv package I do not know how to manually define knots and degrees of
freedom.
Any help would be greatly appreciated.
Spyros
--
View this message in context:
2013 Jan 17
1
plotting from dataframes
thanks to your guys help I am closer to solving my problem but I have some
small problem. So let's say I start with
>data
number day hour
1 17 10
2 17 11
3 17 6
4 18 4
5 18 10
6 19 8
7 19 8
I want to split to odd days, which I am able to do, I call this object
frames, which looks like:
> frames
$`1`
c1 day1 hour1
1 1 17 10
2 2 17 11
3 3 17 6
$`2`
c1 day1
2005 Jul 20
3
Need R Help
Hi,
I am newbie in R. I have R installed on Solaris machine and I am connected
to Solaris machine from Windows using telnet. I want to create png image
file using R. But when I issue R command from telnet:-
> png("test.png")
Following error occurs:
Error in X11(paste("png::", filename, sep = ""), width, height, pointsize,
:
unable to start device PNG
In
2007 Apr 27
2
Jarque-Bera and rnorm()
Folks,
I'm a bit puzzled by the fact that if I generate 100,000 standard normal
variates using rnorm() and perform the Jarque-Bera on the resulting vector,
I get p-values that vary drastically from run to run. Is this expected?
Surely the p-val should be close to 1 for each test?
Are 100,000 variates sufficient for this test?
Or is it that rnorm() is not a robust random number generator?
2007 Nov 06
1
A suggestion for an amendment to tapply
Dear R-developers,
when tapply() is invoked on factors that have empty levels, it returns
NA. This behaviour is in accord with the tapply documentation, and is
reasonable in many cases. However, when FUN is sum, it would also
seem reasonable to return 0 instead of NA, because "the sum of an
empty set is zero, by definition."
I'd like to raise a discussion of the possibility of an
2013 Jan 17
2
create block diagonal with each rows
Dear R users,
I'd like to create a block diagonal matrix with each rows in a matrix.
Here is a simple example. (In fact, the matrix is big)
x <- matrix(1:20, 4,5)
> x
[,1] [,2] [,3] [,4] [,5]
[1,] 1 5 9 13 17
[2,] 2 6 10 14 18
[3,] 3 7 11 15 19
[4,] 4 8 12 16 20
With each rows in matrix x, I'd like to make the matrix below.
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,