[R] e1071::skewness and psych::skew return NaN

2013-02-13 Thread Stephen Politzer-Ahles
) ) #returns NaN The vector has no missing values (and if it did, I would get NA rather than NaN, and the function wouldn't return a number when I give it the raw data). Best, Steve -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa

Re: [R] e1071::skewness and psych::skew return NaN

2013-02-13 Thread Stephen Politzer-Ahles
Hi everyone, Please disregard my last message, I found a 0 in the vector, which is what was causing problems with the log and reciprocal data. Best, Steve On Wed, Feb 13, 2013 at 10:55 AM, Stephen Politzer-Ahles politzerahl...@gmail.com wrote: Hello everyone, Does anyone know what would

Re: [R] Fitting a multinomial model to a multi-way factorial design with repeated measures: help on package and syntax

2012-12-06 Thread Stephen Politzer-Ahles
tried them myself. Best, Steve -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Using multcomp::glht() with Anova object

2012-12-05 Thread Stephen Politzer-Ahles
these same comparisons by re-doing the anova using aov() or lme(), since I don't need the Huynh-Feldt corrections in the post-hoc tests...but I am just curious if i can do the post-hocs directly on my Anova object.) Best, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas

Re: [R] Using multcomp::glht() with Anova object

2012-12-05 Thread Stephen Politzer-Ahles
Thank you John, I'll take a look at that! Best, Steve On Wed, Dec 5, 2012 at 11:39 AM, John Fox j...@mcmaster.ca wrote: Dear Steve, Usually the best place to look for information about functions in the car package, along with the help files for the package, is the book with which the

[R] duplicated() with long vectors

2012-12-05 Thread Stephen Politzer-Ahles
this duplicated()-like vector is to use a for loop going through one item at a time, but that takes about a minute to run. Best, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ __ R-help@r

Re: [R] duplicated() with long vectors

2012-12-05 Thread Stephen Politzer-Ahles
are you trying to accomplish? Sarah On Wed, Dec 5, 2012 at 3:53 PM, Stephen Politzer-Ahles politzerahl...@gmail.com wrote: Hello, duplicated() does not seem to work for a long vector. For example, if you download the data from https://docs.google.com/open?id=0B6-m45Jvl3ZmNmpaSlJWMXo5bmc

Re: [R] duplicated() with long vectors

2012-12-05 Thread Stephen Politzer-Ahles
are using an unreleased development version of R you really must tell us (and should not be reporting to the R-help list). Sarah On Wed, Dec 5, 2012 at 3:53 PM, Stephen Politzer-Ahles politzerahl...@gmail.com wrote: Hello, duplicated() does not seem to work for a long vector. For example

Re: [R] Adding a new variable to each element of a list

2012-11-26 Thread Stephen Politzer-Ahles
. From: Stephen Politzer-Ahles politzerahl...@gmail.com To: arun smartpink...@yahoo.com Cc: R help r-help@r-project.org Sent: Sunday, November 25, 2012 8:35 PM Subject: Re: [R] Adding a new variable to each element of a list Hi Arun, Thanks a lot for the help. I think I didn't make my

Re: [R] Adding a new variable to each element of a list

2012-11-25 Thread Stephen Politzer-Ahles
- From: Stephen Politzer-Ahles politzerahl...@gmail.com To: r-help@r-project.org Cc: Sent: Saturday, November 24, 2012 5:33 PM Subject: [R] Adding a new variable to each element of a list Hello, I have a list of data with multiple elements, and each element in the list has multiple

[R] Adding a new variable to each element of a list

2012-11-24 Thread Stephen Politzer-Ahles
.html), but I can't figure out how to *set* a new variable for each element in a list. Does anyone know how to do this? Thank you, Steve Polizer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ [[alternative HTML version deleted

Re: [R] Merging multiple columns into one column

2012-09-30 Thread Stephen Politzer-Ahles
Hi Meredith, Why not just use paste()? cuyahoga_nf$newcolumn - paste(cuyahoga_nf[,1], cuyahoga_nf[,2], cuyahoga_nf[,3], . , cuyahoga_nf[,4]) Best, Steve Politzer_ahles - Original Message - From: Meredith Ballard LaBeau mmbal...@mtu.edu To: r-help@r-project.org Cc: Sent:

Re: [R] Count based on 2 conditions [Beginner Question]

2012-09-17 Thread Stephen Politzer-Ahles
Most of your counting needs can be handled elegantly with the xtabs() function (cross-tabulation). This'll work a lot faster than an iterative method. For your data I would suggest something like this: # Create a column indicating whether or not the value in Col2 is above 5

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-16 Thread Stephen Politzer-Ahles
Hi Niklas, I like A.K.'s method. Here's another way to do what I think is the same thing you're asking for (this is how I did it before I knew ifelse() existed!) rep_data$clo - 0 rep_data[ rep_data$know %in% c(very well, fairly well) rep_data$getalong %in% c(4,5),]$clo - 1 Best, Steve

[R] Contrasts in mixed effects model: difference between differences

2012-09-12 Thread Stephen Politzer-Ahles
as the standard error reported for the fixed effect [Baayen, 2008:247]). Thank you very much for your feedback, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ [[alternative HTML version deleted

[R] Contrasts in mixed effects model: difference between differences

2012-09-12 Thread Stephen Politzer-Ahles
understanding is that the standard error of the coefficients I would get from ranef(test)$Subject is not going to be exactly the same as the standard error reported for the fixed effect [Baayen, 2008:247]). Thank you very much for your feedback, Steve Politzer-Ahles -- Stephen Politzer-Ahles University

Re: [R] R-help Digest, Vol 115, Issue 12

2012-09-12 Thread Stephen Politzer-Ahles
Hello Amelie, I don't have an answer to your question, but I just wanted to point out this page I noticed recently ( http://hlplab.wordpress.com/2009/05/07/multinomial-random-effects-models-in-r/), which might be helpful. I'm also interested in figuring out how to do a multinomial glmm, so if

[R] Contrasts for 2x4 interaction in mixed effects model

2012-09-11 Thread Stephen Politzer-Ahles
Hi Rachel, Do you get what you need with lmer(H.y.~(cond/patient)*stance + (1|subj), data=H) ? That should give you the comparison between patient groups at each level of Condition (the cond1:patient1, cond2:patient2, and cond2:patient3 that you were looking for). (And I guess it will also give

Re: [R] Contrasts for 2x4 interaction in mixed effects model

2012-09-08 Thread Stephen Politzer-Ahles
(factor(1:2), 4, each=2)) contrasts(tmp$Fir) - c(1, -1) tmp.aov - aov(y ~ Sec/Fir, data=tmp) anova(tmp.aov) cbind(tmp, model.matrix(tmp.aov)[, -1]) On Fri, Sep 7, 2012 at 2:46 PM, Stephen Politzer-Ahles politzerahl...@gmail.com wrote: Hello everyone, I am running a mixed effects model

[R] Contrasts for 2x4 interaction in mixed effects model

2012-09-07 Thread Stephen Politzer-Ahles
terms do the comparisons I'm interested in? Thank you for your advice, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ [[alternative HTML version deleted]] __ R-help@r