[R] Multivariate discrete HMMs

2013-09-02 Thread Claus O'Rourke
Hi r-help, I have been using your RHmm package for some time and have recently had to try using the package for a new dataset. Basically I have a dataset with a number of discrete observation variables that change over time, and I would love to try modeling them using a HMM. Basically I was

[R] Splitting a categorical variable into multiple variables

2013-08-09 Thread Claus O'Rourke
Hello R-Help, I have a variable with 32 levels and I'd like to split this into two variables such that both new variables have = 32 variables. This is to handle the limit of 32 level predictor variables in R's Random Forest implementation. Might someone be able to suggest an elegant way to do

Re: [R] Splitting a categorical variable into multiple variables

2013-08-09 Thread Claus O'Rourke
On Fri, Aug 9, 2013 at 7:10 AM, Claus O'Rourke claus.orou...@gmail.com wrote: Hello R-Help, I have a variable with 32 levels and I'd like to split this into two variables such that both new variables have = 32 variables. This is to handle the limit of 32 level predictor variables in R's

Re: [R] Levels in new data fed to SVM

2013-01-10 Thread Claus O'Rourke
Thanks for clarifying! On Thu, Jan 10, 2013 at 12:47 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 08.01.2013 21:14, Claus O'Rourke wrote: Hi all, I've encountered an issue using svm (e1071) in the specific case of supplying new data which may not have the full range of levels

[R] Levels in new data fed to SVM

2013-01-08 Thread Claus O'Rourke
Hi all, I've encountered an issue using svm (e1071) in the specific case of supplying new data which may not have the full range of levels that were present in the training data. I've constructed this really primitive example to illustrate the point: library(e1071) training.data - data.frame(x

[R] Training parameters for a HMM

2011-12-19 Thread Claus O'Rourke
Hi, I'm a newbie to the world of HMMs and HMMs in R. I've had a look at the hmm package and the RHmm package but I couldn't see anything straightforward on how a labelled sequential dataset with observed values and underlying states might be used to construct and train a HMM based on that data and

Re: [R] Newbie-ish question on iteratively applying function to dataframe

2011-03-16 Thread Claus O'Rourke
Brilliant - that was really useful! On Tue, Mar 15, 2011 at 3:46 PM, Ista Zahn iz...@psych.rochester.edu wrote: Hi Claus, On Tue, Mar 15, 2011 at 9:33 AM, Claus O'Rourke claus.orou...@gmail.com wrote: Hi, I am trying to recursively apply a function to a selection of columns in a dataframe

[R] Newbie-ish question on iteratively applying function to dataframe

2011-03-15 Thread Claus O'Rourke
Hi, I am trying to recursively apply a function to a selection of columns in a dataframe. I've had a look around and from what I have read, I should be using some version of the apply function, but I'm really having some headaches with it. Let me be more specific with an example. Say I have a

[R] Mixed Design ANOVA - singular error model

2010-10-18 Thread Claus O'Rourke
Dear r-help list, I would like to run a mixed design anova to compare the results from one population sample to another. Here my within subject variable (stiulusID) has 45 levels and my between subject variable (group) has two levels. In addition to my number of levels in the within subject

[R] Pairwise cross correlation from data set

2010-06-13 Thread Claus O'Rourke
Dear list, Following up on an earlier post, I would like to reorder a dataset and compute pairwise correlations. But I'm having some real problems getting this done. My data looks something like: Participant Stimulus Measurement p1 s`15 p1 s`2

[R] ANOVA of a sort

2010-06-09 Thread Claus O'Rourke
Dear R Help, I have a general question - I know this is the R list, but I hope someone can help me out a little as I've always found the help here to be absolutely fantastic. I have run a psychological study where participants are given multiple stimuli and their responses to those stimuli are

[R] substring comparison

2010-04-29 Thread Claus O'Rourke
Hi all, I'm writing a script to do some basic text analysis in R. Let's assume I have a data frame named data which contains a column named 'utt' which contains strings. Is there a straightforward way to achieve something like this: data$ContainsThe - ifelse(startsWith(data$Utt,the),y,n) or

Re: [R] substring comparison

2010-04-29 Thread Claus O'Rourke
Thanks. It works perfectly. On Thu, Apr 29, 2010 at 6:24 PM, Henrique Dallazuanna www...@gmail.com wrote: Try with grepl: data$ContainsThe - ifelse(grepl(the,data$Utt),y,n) On Thu, Apr 29, 2010 at 2:17 PM, Claus O'Rourke claus.orou...@gmail.com wrote: Hi all, I'm writing a script to do

Re: [R] Practical work with logistic regression

2010-04-23 Thread Claus O'Rourke
Thanks everyone for the replies, that sure cleared up some things for me. On Fri, Apr 23, 2010 at 9:11 AM, Jan van der Laan djvanderl...@gmail.com wrote: When you just want to calculate the probability of belong to class A or B of a new observation xi and do not have to do any new model

[R] Practical work with logistic regression

2010-04-22 Thread Claus O'Rourke
Dear all, I have a couple of short noob questions for whoever can take them. I'm from a very non-stats background so sorry for offending anybody with stupid questions ! :-) I have been using logistic regression care of glm to analyse a binary dependent variable against a couple of independent

Re: [R] interpretation of p values for highly correlated logistic analysis

2010-04-01 Thread Claus O'Rourke
Thank you both for your advice. I'll follow up on it, but it is good to know that this is a known effect. Claus On Wed, Mar 31, 2010 at 3:02 PM, Stephan Kolassa stephan.kola...@gmx.de wrote: Hi Claus, welcome to the wonderful world of collinearity (or multicollinearity, as some call it)! You