[R] test deviation from a binomial distribution - lack of 50:50

2007-04-23 Thread parn
Dear R-users, I have a data set where each observation consists of a number of trials (n.trials) that varies between 5 and 7, 6 being most common. Each trial can take either of two outcomes, success or failure. A dummy data set: n.trials <- sample(5:7, 50, replace=T, prob=c(0.2, 0.6, 0.2)) succes

[R] mcmcsamp-CI instead of P-values - references?

2006-10-03 Thread Henrik Parn
Dear all, Given the discussions and issues of d.f., p-values and mcmcsamp-CIs in mixed models, I wonder if anyone could recommend one or two papers (or other citable sources for that sake) that summarizes the arguments for/against P-values/mcCIs. I have followed the discussions on R-help and h

[R] equivalent of model.tables for an lm.object?

2006-09-27 Thread Henrik Parn
Dear all, I run a linear model with three significant explanatory variabels x1: a factor with 4 levels x2 and x3: factors with two levels each x4: continuous model <- lm(y ~ x1 + x2 * x3 + x4) <> The data is not perfectly balanced between the different factor-combinations and I use treatment con

[R] lmer applied to a wellknown (?) example: summary

2006-09-01 Thread Henrik Parn
Dear all, I wish to thank Christoph Buser and John Wilkinson for their input, and especially John his examples and for for pointing me to the thread 'Doubt about nested aov output' where the rat-example was hiding...: http://search.gmane.org/?query=Doubt+about+nested+aov+output&email=&group=gma

[R] lmer applied to a wellknown (?) example

2006-08-30 Thread Henrik Parn
Dear all, During my pre-R era I tried (yes, tried) to understand mixed models by working through the 'rat example' in Sokal and Rohlfs Biometry (2000) 3ed p 288-292. The same example was later used by Crawley (2002) in his Statistical Computing p 363-373 and I have seen the same data being used

[R] lmList and missing values

2006-08-18 Thread Henrik Parn
Dear all, I have a question on handling of missing values in lmList. My data set have continuous predictor and response, x and y, and a grouping variable group.id. All these variables have NAs and the data set also has several other variables that also contains NAs. To create the lmList-object

[R] fixed effects following lmer and mcmcsamp - which to present?

2006-08-08 Thread Henrik Parn
Dear all, I am running a mixed model using lmer. In order to obtain CI of individual coefficients I use mcmcsamp. However, I need advice which values that are most appropriate to present in result section of a paper. I have not used mixed models and lmer so much before so my question is probab

[R] paired t-test. Need to rearrange data?

2006-08-06 Thread Henrik Parn
Dear all, I have received some data arranged like this: # original data id <- rep(letters[1:6], each=2) time <- as.factor(rep(1:2, 6)) y <- as.vector(replicate(6, c(rnorm(n=1, mean=1), rnorm(n=1, mean=2 test.data <- data.frame(id, time, y) test.data I would like to perform a paired t-test of

[R] efficient way to make NAs of empty cells in a factor (or character)

2006-08-03 Thread Henrik Parn
Dear all, I have some csv-files (originating from Excel-files) containing empty cells. In my example file I have four variables of different classes, each with some empty cells in the original csv-file: > test <- read.csv2("test.csv", dec=".") > test id id2 x y 1 a 1 NA 2 b e

[R] break axis using plotrix

2006-07-16 Thread Henrik Parn
Dear all, I am trying to plot some data with differing range in y-values with type="b", adding error bars and break the y-axis into two parts, one lower part from 12 to 20, and one upper part from 34 to 40. I have tried to follow the basic ideas from the script provided here by Jim Lemon: http

Re: [R] more documentation on lmer?

2006-04-09 Thread Henrik Parn
Dear Bill, You might check Faraway's 'Extending the Linear Model with R: Generalized Linear, Mixed Effects and Nonparametric Regression Models' (2006). Without having read the book properly, at least I noticed that package lme4 and the function lmer is used in the examples. Best regards, Henri

[R] dist() between groups of data

2006-02-23 Thread Henrik Parn
Dear all, I have a data set with x and y positions of nests. Each nest can be grouped according to a factor z. I have made a small dummy data set, where the grouping variable z is 0 or 1: x <- runif(6) y <- runif(6) z <- rep(c(0,1), each=3) xyz <- cbind(x,y,z) xyz x y z [

[R] SciViews-R_0.8-9 Console problem

2005-11-30 Thread Henrik Parn
Dear R users, I successfully installed SciViews the other day. However, when I try to run it now, the command/script window does not appear. Strange. Well, actually I see a tendency to a script window (in the lower part of the sciview window where it is suppose to be) during start up, but when