Re: [R] Two-way Random Effects with unbalanced data

2012-11-08 Thread asafwe
Matthias, This is so very helpful! Thank you so much for exposing me to this. Seems like exactly what I was looking for. Best regards, Asaf -- View this message in context: http://r.789695.n4.nabble.com/Two-way-Random-Effects-with-unbalanced-data-tp4647795p4648995.html Sent from the R help

[R] What does uniroot return when an error occurs

2012-11-01 Thread asafwe
Hi, I'm using the uniroot function, and would like to detect an error which occurs, for instance, when the values at endpoints are not of opposite signs. For example: uniroot( function(x) x^2+1, lower=1, upper=2 ). I want to say something like: if "error in uniroot(...)" return NA else return u

[R] Two-way Random Effects with unbalanced data

2012-10-29 Thread asafwe
Hi there, I am looking to fit a two-way random effects model to an *unblalanced* layout, y_ijk = mu + a_i + b_j + eps_ijk, i=1,...,R, j=1,...,C, k=1,...,K_ij. I am interested first of all in estimates for the variance components, sigsq_a, sigsq_b and sigsq_erro

Re: [R] Data type in a data frame

2012-10-23 Thread asafwe
So helpful, Arun -- Thank you! Asaf -- View this message in context: http://r.789695.n4.nabble.com/Data-type-in-a-data-frame-tp4647161p4647171.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

[R] Data type in a data frame

2012-10-23 Thread asafwe
Hi all, How does R know to regard a variable as a factor and not a character? For example, consider the following table: ObservationGenderDosage Alertness 1 ma 8 2

Re: [R] Counting duplicates in a dataframe

2012-10-22 Thread asafwe
Thank you all; David -- this is, in fact, exactly what I need! Asaf -- View this message in context: http://r.789695.n4.nabble.com/Counting-duplicates-in-a-dataframe-tp4646954p4647075.html Sent from the R help mailing list archive at Nabble.com. __

[R] Counting duplicates in a dataframe

2012-10-21 Thread asafwe
Hello, I am looking at a two-way ANOVA dataset, and would like to count the rows in the dataframe with the same level of the first factor ("Gender") and the second factor ("Dosage"). In other words, I am interested in the number of observations per each "cell" in a (not necessarily balanced) two-w