Re: [R] random truncation

2019-07-12 Thread Abby Spurdle
> The distribution of the randomly truncated variable has thus four > parameters: a, b, mu and sigma. I was able to write down the likelihood > and attempted to maximise it I read the Wikipedia article more carefully. The formula is relatively simple, and is based on the application of Bayes

Re: [R] random truncation

2019-07-12 Thread Rolf Turner
On 13/07/19 10:54 AM, Spencer Graves wrote: Hello:   What do you suggest I do about modeling random truncation? Good question! Probably the best answer is "Give up and go to the pub!" :-) But seriously, there is a package DTDA on CRAN which purports to analyse randomly truncated

Re: [R] random truncation

2019-07-12 Thread Bert Gunter
Did you search on e.g. "model truncation" at rseek.org? Several packages came up that appear to deal with truncated data, though I have no clue whether in the way you specify. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into

Re: [R] random truncation

2019-07-12 Thread Abby Spurdle
> It would be nice if I had an R > package that would make it relatively easy to model the truncation as a > function of "d" I suspect that R has everything you need, already. However, I suspect you may need to reformulate your question to find what you need. > I assume that the probability of

[R] random truncation

2019-07-12 Thread Spencer Graves
Hello:   What do you suggest I do about modeling random truncation?    I have data on a variable Y in strata S[0], S[1], ..., S[n], where Y is always observed in S[0] but is less often observed in the other strata.  I assume that the probability of observing Y is a monotonically

Re: [R] Plotting in R

2019-07-12 Thread Jim Lemon
Oh, sorry, I think I see what you have tried to do. You want yearly ticks but month-day labels. These won't mean much unless you also have the year. If you ask for a date with just the year, as.Date will give you a date in the middle of that year: as.Date("2002","%Y") [1] "2002-07-13" So making

Re: [R] Plotting in R

2019-07-12 Thread Jim Lemon
Hi Steven, year1 is a number (e.g. 1993), monthday (e.g. 05-01) is not. Jim On Fri, Jul 12, 2019 at 10:56 PM wrote: > > Thanks Jim. > > I am trying to apply this to my version with plot_ly, and couldn't make it to > work. > The sydf$year1 field is numeric, so the min() and max() works, but

Re: [R] need help in if else condition

2019-07-12 Thread Richard O'Keefe
"ifelse is very slow"? Benchmark time. > x <- runif(100) > y <- runif(100) > system.time(ifelse(x < y, x, y)) user system elapsed 0.403 0.044 0.448 > system.time(y + (x < y)*(x - y)) user system elapsed 0.026 0.012 0.038 This appears to be a quality-of-implementation

Re: [R] Plotting in R

2019-07-12 Thread nstefi
Thanks Jim. I am trying to apply this to my version with plot_ly, and couldn't make it to work. The sydf$year1 field is numeric, so the min() and max() works, but when I tried to use your formula for the sydf$monthday field I get an error: yrticks <-

[R-es] VI Xornada de Usuarios de R en Galicia (10/10/2019)

2019-07-12 Thread miguel.angel.rodriguez.muinos
Por si es de vuestro inter�s... https://www.r-users.gal/ Pd.- Lanzado el "call for papers", el programa todav�a est� por determinar. Un saludo. ? Nota: A informaci�n contida nesta mensaxe e os seus posibles documentos adxuntos � privada e