[R] LDA select number of topics

2015-11-08 Thread srecko joksimovic
Hi all, I've seen recently this great post by Nikita Murzintcev http://rpubs.com/nikita-moor/107657. If I understood correctly, according to Griffiths (2004) I should select 11 topics? But, it seems that other metrics suggest quite different number of topics? I mean, 11 topics is about the right

[R] Regression model

2013-11-21 Thread srecko joksimovic
Hi, I'm trying to fit regression model, but there is something wrong with it. The dataset contains 85 observations for 85 students.Those observations are counts of several actions, and dependent variable is final score. More precisely, I have 5 IV and one DV. I'm trying to build regression model

Re: [R] Regression model

2013-11-21 Thread srecko joksimovic
question isn't really an R question but rather a statistics/linear modelling question. It is possible that you might get some insight from Frank Harrel's book Regression Modelling Strategies (Springer, 2001). cheers, Rolf Turner On 11/22/13 12:52, srecko joksimovic wrote: Hi

Re: [R] lmerTest

2013-10-13 Thread srecko joksimovic
Thanks Uwe, I wasn't quite sure about that one... when I build model with that particular variable, that is what happen. have to check why... Best, Srecko On Sun, Oct 13, 2013 at 5:45 AM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 13.10.2013 02:52, srecko joksimovic wrote: ok

[R] lmerTest

2013-10-12 Thread srecko joksimovic
Hi, I'm trying to user lmer function from lmerTest package because, if I understood correectly, it allows to make better inference than lmer method from lme4 package. However, whatever I do I keep getting this error: Error in lme4::lFormula(formula = mark ~ ssCount + sTime+ : rank of X = 1660

Re: [R] lmerTest

2013-10-12 Thread srecko joksimovic
: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. srecko

[R] multilevel analysis

2013-09-30 Thread srecko joksimovic
I have an example of multilevel analysis with 3 levels, but data are non-normally distributed. In case of normal distribution, I would perform multilevel linear analysis using lme function, but what should I do in case of non-normal distribution? thanks, Srecko [[alternative HTML version

Re: [R] multilevel analysis

2013-09-30 Thread srecko joksimovic
:50 PM, srecko joksimovic wrote: I have an example of multilevel analysis with 3 levels, but data are non-normally distributed. In case of normal distribution, I would perform multilevel linear analysis using lme function, but what should I do in case of non-normal distribution

Re: [R] multilevel analysis

2013-09-30 Thread srecko joksimovic
: On Sep 30, 2013, at 3:22 PM, srecko joksimovic wrote: I thought so, but then I found this: Normality The assumption of normality states that the error terms at every level of the model are normally distributed maybe I misinterpreted something. Notice that it is the _error_terms_

Re: [R] Unrecognized token

2013-09-17 Thread srecko joksimovic
a query that works. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of srecko joksimovic Sent: Tuesday, September 17, 2013 9:04 AM To: R help Subject: [R] Unrecognized

[R] Unrecognized token

2013-09-17 Thread srecko joksimovic
Hi, when I generate query using sqldf library, like this: query = paste(paste(select * from tbl_user where student_id = , id, sep=), order by date_time, sep=) student - sqldf(query) everything works fine in case the id is 21328, 82882, or something like that. But, when id is

Re: [R] Unrecognized token

2013-09-17 Thread srecko joksimovic
to be key to getting valid SQL syntax... but looking at the query before shipping it off to a database engine seems to me to be an obvious technique you should learn. On Tue, 17 Sep 2013, srecko joksimovic wrote: There is no difference, the same query structure is in the both cases:6683

Re: [R] Unrecognized token

2013-09-17 Thread srecko joksimovic
. srecko joksimovic sreckojoksimo...@gmail.com wrote: Hi, when I generate query using sqldf library, like this: query = paste(paste(select * from tbl_user where student_id = , id, sep=), order by date_time, sep=) student - sqldf(query) everything works fine in case the id

Re: [R] Unrecognized token

2013-09-17 Thread srecko joksimovic
17, 2013 at 9:47 AM, srecko joksimovic sreckojoksimo...@gmail.com wrote: thanks, Jeff, good point... I'll try that On Tue, Sep 17, 2013 at 9:43 AM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote: Why don't you print the 'query' variable with each id value and consider what the SQL syntax

[R] split on change occurence

2013-09-16 Thread srecko joksimovic
Hi, I had an example like this: iduseraction 1 12 login 2 12 view 3 12 view 4 12 view 5 12 login 6 12 view 7 12 view 8 12 login which I used to split using split(dat1,cumsum(dat1$action==login)). If I had a

Re: [R] split on change occurence

2013-09-16 Thread srecko joksimovic
ip1 2 12 ip1 3 12 ip2 4 12 ip2 5 12 ip2 6 12 ip3 7 12 ip3 8 12 ip3 , header = TRUE) split(dat, dat$IP) Hope this helps, Rui Barradas Em 16-09-2013 22:57, srecko joksimovic escreveu: Hi, I had an example

[R] Add new calculated column to data frame

2013-08-29 Thread srecko joksimovic
Hi, I have a following data set: ideventtime (in sec) 1 add 1373502892 2 add 1373502972 3 delete 1373502995 4 view 1373503896 5 add 1373503996 ... I'd like to add new column time on task which is time elapsed between two events (id2 - id1...).

Re: [R] Add new calculated column to data frame

2013-08-29 Thread srecko joksimovic
1373502995 23 #4 4 view 1373503896 901 #5 5add 1373503996 100 #Not sure whether this depends on the values of event or not.. A.K. - Original Message - From: srecko joksimovic sreckojoksimo...@gmail.com To: R help R-help@r-project.org Cc: Sent

Re: [R] Add new calculated column to data frame

2013-08-29 Thread srecko joksimovic
On Thu, Aug 29, 2013 at 11:22 AM, arun smartpink...@yahoo.com wrote: Hi Srecko, No problem. Regards, Arun From: srecko joksimovic sreckojoksimo...@gmail.com To: arun smartpink...@yahoo.com Sent: Thursday, August 29, 2013 2:22 PM Subject: Re: [R

Re: [R] Add new calculated column to data frame

2013-08-29 Thread srecko joksimovic
Thanks Berend, I don't know why I didn't try that before posting the question... but... anyways, thanks for your help Srecko On Thu, Aug 29, 2013 at 11:34 AM, Berend Hasselman b...@xs4all.nl wrote: On 29-08-2013, at 20:15, srecko joksimovic sreckojoksimo...@gmail.com wrote: Thanks Arun

Re: [R] Add new calculated column to data frame

2013-08-29 Thread srecko joksimovic
=31idp=45 A.K. From: srecko joksimovic sreckojoksimo...@gmail.com To: arun smartpink...@yahoo.com Sent: Thursday, August 29, 2013 5:38 PM Subject: Re: [R] Add new calculated column to data frame Hi Arun, I really appreciate your help, and we did

Re: [R] Add new calculated column to data frame

2013-08-29 Thread srecko joksimovic
. From: srecko joksimovic sreckojoksimo...@gmail.com To: arun smartpink...@yahoo.com Sent: Thursday, August 29, 2013 6:04 PM Subject: Re: [R] Add new calculated column to data frame Did you mean to separate the number 33 from the link? , yes that is correct. It should be something like

[R] Iterate over rows and update values based on condition

2013-08-27 Thread srecko joksimovic
Hi, I have a data set with structure similar to this: iduseraction 1 12 login 2 12 view 3 12 view 4 12 view 5 12 login 6 12 view 7 12 view 8 12 login I want to create a list of sessions. That means to split

Re: [R] Iterate over rows and update values based on condition

2013-08-27 Thread srecko joksimovic
view #7 7 12 view # #$`3` # id user action #8 8 12 login A.K. - Original Message - From: srecko joksimovic sreckojoksimo...@gmail.com To: R-help@r-project.org Cc: Sent: Tuesday, August 27, 2013 3:29 PM Subject: [R] Iterate over rows and update values based on condition