Displaying 20 results from an estimated 6000 matches similar to: "how to get the position of an element in a vector ?"
2007 May 22
5
basic problem but can't solve it
Hello,
I have a basic problem but i can't figure it out with the
table underneath. I would like to compute monthly averages.
I would like to have the average measure for month #5 for the first
three rows (the same number in the first three lines) and the average
measure for month #6 for the last four rows ((the same number in the first
three lines) in a separate vesctor (let's call
2007 Jul 12
2
how to get the p-values from an lm function ?
Hi, dear R-users,
I am computing a liner regression by rating category using the 'by' function
as stated below:
tmp <- by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP500, data =
x))
I would like to get not only the coefficients but also their p-values. I
can't find the command in the help pages to get them.
Does anyone have a suggestion ?
Thank you,
Benoit.
2007 May 28
1
monthly least squares estimation
Hi R-programmers !
I would like to perform a linear model regression month by month using the
'lm' function and i don't know how to do it.
The data is organised as below:
Month ExcessReturn Return STO
8 0.047595875 0.05274292 0.854352503
8 0.016134874 0.049226941 4.399372005
8 -0.000443869 0.004357305 -1.04980297
9 0.002206554 -0.089068828 0.544809429
9 0.021296551
2007 Dec 03
3
ggplot2: Choosing colours
Dear useRs,
I'm trying to specify the colour of a factor with ggplot2. The example
below gets me close to what I want, but it's missing a legend.
Any ideas?
Thanks,
Thierry
library(ggplot2)
dataset <- data.frame(x = rnorm(40), y = runif(40), z = gl(4, 10, labels
= LETTERS[1:4]))
ggplot(data = dataset, aes(x = x, y = y, group = z)) + geom_point(colour
= c("red",
2006 Oct 25
3
simplification of code using stamp?
Hi
I have the following code which I would like to simplify. Id does linear
regressions and returns the r-squares, and the coefficients.
It runs slow, as it is doing the regressions for each - is it possible
to get the values in a dataframe which looks as follow:
expert | xx | seeds | r.squared | slope | intercept
Thanks in advance,
Rainer
library(reshape)
rsqs <- as.data.frame(
2007 Feb 13
1
RE2: Suddenly "Subscript out of bounds"
If you tell me how to update R itself automatically, I will go for your
advice.
I am not aware of any method to do it...
Bye
Rick
"ONKELINX,
Thierry"
2008 Feb 06
2
Multivariate Maximum Likelihood Estimation
Hi,
I am trying to perform Maximum Likelihood estimation of a Multivariate
model (2 independent variables + intercept) with autocorrelated errors of
1st order (ar(1)).
Does R have a function for that? I could only find an univariate option
(ar.mle function) and when writing my own I find that it is pretty
memory-consuming (and sometimes wrong) so there must be a better way.
Thanks,
KB
2008 Feb 12
3
problems plotting geom_line on ggplot2
Se ha borrado un texto insertado con un juego de caracteres sin especificar...
Nombre: no disponible
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080212/16ba8b97/attachment.pl
2008 Feb 25
3
Logical statements and subseting data...
Hi,
I'm scratching my head as to why I can't use the subset() command to
remove one line of data from a data frame.
There is just one row (out of 45840) that I'd like to remove and it
can be identified using....
> dim(raw.all.clean)
[1] 45840 10
> subset(raw.all.clean, Height.1 == 0 & Height.2 == 0)
Sample.Name Well SNP Allele.1 Allele.2 Size.1 Size.2
2007 Oct 04
5
A rebel boxplot question
Dear R list members
I am trying to improve a boxplot with 2 data sets. I run somethinkg like
boxplot(data1 ~ month, add=F, col = "red", ...)
boxplot(data2 ~ month, add=T, col = "blue", ...)
The problem is that the data from February are missing for data2, so R
think that must take little more space between the data classes in data 2
and then both data gropus are not aligned.
2007 Jul 18
1
Strange warning in summary.lm
Dear useRs,
Lately I noticed a strange warning in the summary of a lm-object. Any
idea what this warning is about? I'm using R 2.5.1 on Win XP pro.
> x <- rnorm(100)
> y <- rnorm(100)
> summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-1,77809 -0,68438 -0,04409 0,63891 2,30863
Coefficients:
Estimate Std.
2007 Feb 12
3
Linking R with Microsoft SQL Server / Client
Hello
My colleagues and I have recently established a large database (40 tables
each with greater than 15 variables) in Microsoft's SQL Server 2000.
Currently we are accessing this database via SQL client running an Windows
XP. Our objectives are many fold including running SQL applications,
outputting results to ARC/INFO IMS, production of summarizing tables -
graphs and web interfaces for
2006 Nov 10
2
Simplifying Sweave graphics
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20061110/9afb0083/attachment.pl
2007 Jan 03
2
understanding integer divide (%/%)
I am confused about why the following occurs:
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 4.0
2007 Oct 08
1
semivariogram
I need the most straightforward way to build semivariograms within R
i am currently using s-gems software but i would like to even test R
Thanks
D
[[alternative HTML version deleted]]
2007 Feb 16
2
plotting
Hello,
I use newly R! I'd like to plot several data set together in one output window! How can I do that?
Best regards
Hadi
---------------------------------
Never miss an email again!
[[alternative HTML version deleted]]
2007 Apr 25
1
program avail. for simulating spatial patterns?
Hi all,
I am wondering if there is a function available in R for simulating
spatial distribution of objects (plants in this case) in order to
simulate sampling of a population . Specifically, I would like to be
able to change the spatial correlation of individuals. I don't want
to reinvent the wheel if it already exists.
Thanks,
Wade
2007 Nov 03
2
cumsum
Hi, my problem belongs to the basic ones. I want to get cumulated sum over
the matrix columns by one command (if such exists). Ordinary R's cumsum(x)
when x is:
[,1] [,2]
[1,] 1 5
[2,] 2 6
[3,] 3 7
[4,] 4 8
yields: 1 3 6 10 15 21 28 36
I want:
[,1] [,2]
[1,] 1 5
[2,] 3 11
[3,] 6 18
[4,] 10 26
Is there any command to do so??
best,
2008 Jan 11
2
How to add rowSums into list?
Hi R-users,
I have a list
a <- list(one=matrix(rnorm(20), 5, 4), two=matrix(rnorm(20, 3, 0.5),5,4))
How to add rowSums (calculated using lapply) to corresponding matrix
in this list
lapply(a, function(x) rowSums(x))
??
-Lauri
2008 Feb 19
2
qplot
Hello,
I have a question about "qplot": How can I add another line to the same
plot ?
(like function "lines" in "plot").
Thank You,
Sigalit.
[[alternative HTML version deleted]]