Displaying 20 results from an estimated 72 matches for "niederlein".
2011 Feb 11
2
fitdistr question
Hello,
I tried to fit a poisson distribution but looking at the function
fitdistr() it does not optimize lambda but simply estimates the mean
of the data and returns it as lambda. I'm a bit confused because I was
expecting an optimization of this parameter to gain a good fit...
If I would use mle() of stats4 package or mle2() of bbmle package, I
would have to write the function by myself
2011 Feb 21
2
Console output
Hi there,
I though there has been a possibility to force the output on the
console with one element per line. Instead of this:
> 1:10
[1] 1 2 3 4 5 6 7 8 9 10
something like this
> 1:10
[1] 1
[2] 2
[3] 3
[4] 4
[5] 5
[6] 6
[7] 7
[8] 8
[9] 9
[10] 10
Can anybody help?
Antje
2011 Dec 21
2
unique combinations
Hi there,
I have a vector and would like to create a data frame, which contains
all unique combination of two elements, regardless of order.
myVec <- c(1,2,3)
what expand.grid does:
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
what I would like to have
1,1
1,2
1,3
2,2
2,3
3,3
Can anybody help?
2011 Feb 07
2
question mle again
A few day ago, I was looking for an answer to my question but didn't
get one. Anybody who can help now?
Hello,
I tried to use mle to fit a distribution(zero-inflated negbin for
count data). My call is very simple:
mle(ll)
ll() takes the three parameters, I'd like to be estimated (size, mu
and prob). But within the ll() function I have to judge if the current
parameter-set gives a nice
2008 Dec 05
6
levels update
Hello,
I hope this question is not too stupid. I would like to know how to update
levels after subsetting data from a data.frame.
df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4))
names(df) <- c("X1","X2","X3")
my.sub <- subset(df, X1 == "a" | X1 == "b")
2006 Aug 23
5
two density curves in one plot?
Hello,
I was wondering if I can plot two curves I get from "density(data)" into
one plot. I want to compare both.
With the following commad, I just get one curve plotted:
plot( density(mydata) )
Sorry for this stupid question but I could not find a solution until now...
Antje
2011 Feb 01
1
mle question
Hello,
I tried to use mle to fit a distribution(zero-inflated negbin for
count data). My call is very simple:
mle(ll)
ll() takes the three parameters, I'd like to be estimated (size, mu
and prob). But within the ll() function I have to judge if the current
parameter-set gives a nice fit or not. So I have to apply them to
observation data. But how does the method know about my observed
2011 Mar 19
2
How to find position in bin-data?
Hi there,
probably there is a very simple solution, but I cannot think of one...
I have a vector with values:
data <- c(1,6,3,4,8,4,2,9)
and I have a vector with bin breaks:
bins <- c(1,3,5,7,9,11)
Now, I'd like to get for each data point the index of the bin-vector
where the value falls in (or equals the lower bin break).
In the example case, I'd like to get:
2006 Jul 28
2
mirror vector?
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20060728/3f67aa27/attachment.pl
2009 May 04
4
levelplot question
Hi there,
I have a question concerning the behaviour of the colouring with levelplot. (I
hope, I manage to explain)
If I give the parameters "at" and "col.regions" like this:
at <- c(1,2,3,4,5,6)
col.regions <- c("blue","blue","blue","yellow","yellow","yellow")
Which color would have the value 3.5?
I would
2007 Oct 30
2
flexible processing
Hello,
unfortunately, I don't know a better subject. I would like to be very flexible
in how to process my data.
Assume the following dataset:
par1 <- seq(0,1,length.out = 100)
par2 <- seq(1,100)
fac1 <- factor(rep(c("group1", "group2"), each = 50))
fac2 <- factor(rep(c("group3", "group4", "group5", "group6"), each =
2008 Dec 02
3
boxplot via plot command
Hi folks,
I've just discovered that the following code leads to boxplot (surprisingly to me).
Can anybody explain to me why? Is this documented somewhere? I've never
consider this option before.
x <- rnorm(300)
l <- c(rep("label1",100), rep("label2",50), rep("label3",150))
df <- data.frame(as.factor(l), x)
plot(df)
Thank you!
Antje
2006 Nov 01
4
extract values from a vector
Hello,
I'm looking for a solution for the following problem:
I have two vectors
V1 <- c("apple","honey","milk","bread","butter")
V2 <- c("bread","milk")
now, I would like to know for each element in V1 if it's equal to one of
the elements in V2
I could do:
which(V1 == V2[1] | V1 == V2[2])
but what if I
2011 Jan 27
3
Warning with mle
Hi there,
I'm pretty new to the field of fitting (anything). I try to fit a
distribution with mle, because my real data seems to follow a
zero-inflated poisson distribution. So far, I tried a simple example
to see whether I understand how to do it or not:
# example count data
x <- 0:10
y <- dpois(x, lambda = 1.4)
# zero-inflated poisson
zip <- function(x, lambda, prop) {
(1 -
2009 Jan 21
3
merging several dataframes from a list
Hi there,
I have a list of dataframes (generated by reading multiple files) and all
dataframes are comparable in dimension and column names. They also have a
common column, which, I'd like to use for merging. To give a simple example of
what I have:
df1 <- data.frame(c(LETTERS[1:5]), c(2,6,3,1,9))
names(df1) <- c("pos", "data")
df3 <- df2 <- df1
df2$data
2009 Jan 20
5
from matrix to data.frame
Hello,
I have a question how to reshape a given matrix to a data frame.
# ----------------------------------
> a <- matrix(1:25, nrow=5)
> a
[,1] [,2] [,3] [,4] [,5]
[1,] 1 6 11 16 21
[2,] 2 7 12 17 22
[3,] 3 8 13 18 23
[4,] 4 9 14 19 24
[5,] 5 10 15 20 25
> colnames(a) <- LETTERS[1:5]
> rownames(a) <-
2006 Nov 23
1
barplot - x-axis
Hi there,
I have a barplot and the labels at the x-axis are strings, which are
rotated by 90?. But now the sub-title of the barplot is in between these
labels, which does not look very nice...
Could anybody help me finding the parameter-setting to prevent this?
par(mai=c(1.5,1,1,0.6))
barplot(data, las=2, ylim = c(0,plotMax+1), ylab = "Percentage", main =
filename, sub = subtitle)
2007 May 02
2
choose.dir
Hi all,
I have written a R-script under Windows using choose.dir. Now, I have
seen that this function is missing at MacOS. Does anybody know an
alternative?
Antje
2007 Nov 01
1
structure data
Hello,
I have a quite simple question, I guess. I have a data frame and I would like
to process the data in several ways.
The processing is dependent on grouping (factors) and the parameter itself.
Meaning for parameter1 in the df, I would like to calculate the mean and sd
when grouping by factor1. But parameter2 might be different. I thought of a
structure like this:
group1
param1
2008 Oct 06
3
horizontal boxplot + xlim
Hi there,
I get a strange behaviour of a boxplot with the following code. There seems to
be a problem with the xlim-parameter. Did I do anything wrong? What else can I
do to force the boxplot to have a defined x-range?
x <- rnorm(100)
boxplot(x, notch=TRUE, xlab=parameter, xlim <- c(-4,4), horizontal = TRUE)
Antje