Re: [R] random truncation

2019-07-13 Thread Spencer Graves
PLEASE EXCUSE:  This discussion has diverged from R into discussing the precise assumptions seemingly descriptive of an application that drove the initial post to this thread.  A reply by Abby Spurdle seemed to  me to raise questions, whose answers may not be intelligible without material snipp

Re: [R] random truncation

2019-07-13 Thread Abby Spurdle
Note my last response is probably off-topic. I just wanted to highlight the need for defining problems in a way that computers (and R programmers) can understand. On Sun, Jul 14, 2019 at 1:13 PM Abby Spurdle wrote: > > Firstly, we don't really need all your working. > Just the problem you want so

Re: [R] random truncation

2019-07-13 Thread Abby Spurdle
Firstly, we don't really need all your working. Just the problem you want solve. However, I'm still having difficulty understanding this. > I'm observing Y[i] = (X[i]'b+e) given Y[i]>(z[i]'c+f) where e and > f are normally distributed with standard deviations s and t, > respectively, i = 1:n. I

Re: [R] random truncation

2019-07-13 Thread Abby Spurdle
> What integral? What do you mean "What integral?"... The integral on the Wikipedia page. (The same page referenced in the earlier posts). https://en.wikipedia.org/wiki/Truncated_distribution#Random_truncation https://wikimedia.org/api/rest_v1/media/math/render/svg/93717ffcd3bfa2a60d825bd71b5375a

Re: [R] random truncation

2019-07-13 Thread Spencer Graves
On 2019-07-12 22:31, Abby Spurdle wrote: > 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,

Re: [R] random truncation

2019-07-12 Thread Rolf Turner
On 13/07/19 3:31 PM, Abby Spurdle wrote: > 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 simp

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 Theo

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 da

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 it."

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 ob

[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 inc