[R] multinomial probabilities with mlogit

2015-03-30 Thread Ingrid Charvet
Hello, When fitting a logit multinomial model with mlogit I can retrieve the response probabilities using fit$fitted.values (for a given object fit) However, I am trying to calculate those response probabilities myself using the maximum likelihood estimates (i.e. fit$coefficients) given by

Re: [R] R console colours (R profile)

2015-01-13 Thread Ingrid Charvet
...@gmail.com] Sent: 12 January 2015 19:12 To: Ingrid Charvet Cc: r-help@r-project.org Subject: Re: [R] R console colours (R profile) I think you're setting the colors incorrectly. My understanding from reading the package docs is that you use setOutputColors to do so, and not the options() approach

Re: [R] R console colours (R profile)

2015-01-13 Thread Ingrid Charvet
Charvet; Sarah Goslee Cc: r-help@r-project.org Subject: Re: [R] R console colours (R profile) On 13/01/2015 2:52 AM, Ingrid Charvet wrote: Thanks for your reply Sarah. I am using R on Windows 7 professional, 64-bit-OS (on my local machine). setOutputColors doesn’t work in Windows however I came

[R] R console colours (R profile)

2015-01-12 Thread Ingrid Charvet
Hello R users, I would like to set defaults text and background colours of my R console using R profile (to load automatically each time I start a new session) So far my R profile is set up like this: if(interactive()) { suppressWarnings(require(colorout,quietly=T)) message(successfully loaded

[R] Interpolate through NAs using monotonic smoothing spline

2014-10-23 Thread Ingrid Charvet
In the figure attached test, I would like to interpolate the empty - NA section to connect the two curves. 1/ I tried using na.approx and na.spline, without success. na.approx(test,na.rm=FALSE) na.spline(test,na.rm=FALSE) In the first case it just draws a straight line between the end and

[R] jitter function when length(x) = 1

2014-10-09 Thread Ingrid Charvet
Hello, A quick question relating to the documentation of the jitter function: http://127.0.0.1:15714/library/base/html/jitter.html jitter(x, factor = 1, amount = NULL) If amount is NULL (default), we set a - factor * d/5 where d is the smallest difference between adjacent unique (apart from

Re: [R] Print list to text file with list elements names

2014-10-02 Thread Ingrid Charvet
OK I get it, all options work well now. Thank you! -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: 01 October 2014 19:05 To: Ingrid Charvet Cc: r-help@r-project.org Subject: Re: [R] Print list to text file with list elements names You want to put lapply

[R] Print list to text file with list elements names

2014-10-01 Thread Ingrid Charvet
Hi everyone, I want to write a list of data frames to a text file and preserve the names given to the list elements (I am using R 3.1.0). I tried: setNames(myList, myNames) # myNames is a vector of char elements same length as myList sink(sprintf(%s,filename)) lapply(myList,print) sink()

Re: [R] Print list to text file with list elements names

2014-10-01 Thread Ingrid Charvet
list element) when what I would like is to have them all in one file... Ingrid -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: 01 October 2014 15:54 To: Ingrid Charvet Cc: r-help@r-project.org Subject: Re: [R] Print list to text file with list elements names Omit

[R] Definition of the shape paramter in PERT (mc2d)

2014-07-17 Thread Ingrid Charvet
Hello everyone, I am trying to define a PERT distribution by hand by transforming a classic beta distribution - as I would like to understand where the shape parameter (default value of 4) comes from in the mc2d package. The help page says The PERT distribution is a beta distribution extended