Discussion:
[R-sig-ME] intercept and threshold values to calculate probability based on mixor package
K Imran M
2018-10-30 05:18:25 UTC
Permalink
Hi everyone,

I need help to identify the values for intercept and thresholds in the
equations to calculate the probability (based on cumulative link models).

On page 209 in Longitudinal Data Analysis book by Hedeker, the
probabilities are written as:

Pr(Yij=1) = 1/{1 + exp[-(v1 -(xijB+zijV))]}
Pr(Yij=2) = 1/{1 + exp[-(v2 -(xijB+zijV))]} - Pr(Yij=1)
Pr(Yij=3) = 1/{1 + exp[-(v3 -(xijB+zijV))]} - Pr(Yij=2)
Pr(Yij=4) = 1 - 1/{1 + exp[-(v3 -(xijB+zijV))]}

My question is what are the values for v1, v2 and v3?

The R scripts below shows the codes and the results from running mixor.

library(mixor)
#> Loading required package: survival
data("schizophrenia")
mixor.mod <- mixor(imps79o ~ TxDrug + SqrtWeek + TxSWeek,
data = schizophrenia, id = id, which.random.slope = 2,
link = "logit")
summary(mixor.mod)

#>
#> Estimate Std. Error z value P(>|z|)
#> (Intercept) 7.318831 0.480778 15.2229 < 2.2e-16 ***
#> SqrtWeek -0.882261 0.234568 -3.7612 0.0001691 ***
#> TxDrug 0.057917 0.399102 0.1451 0.8846178
#> TxSWeek -1.694861 0.268131 -6.3210 2.598e-10 ***
#> (Intercept) (Intercept) 6.997646 1.369273 5.1105 3.213e-07 ***
#> (Intercept) SqrtWeek -1.508514 0.536023 -2.8143 0.0048888 **
#> SqrtWeek SqrtWeek 2.008916 0.453587 4.4290 9.469e-06 ***
#> Threshold2 3.901260 0.213257 18.2937 < 2.2e-16 ***
#> Threshold3 6.507172 0.289991 22.4392 < 2.2e-16 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1


Thank you very much.

Best wishes,

Kamarul Imran Musa
MD PhD
Universiti Sains Malaysia
Malaysia

[[alternative HTML version deleted]]
K Imran M
2018-10-30 06:49:57 UTC
Permalink
Let me improve the question. On page 209, the authors wrote this for
Pr(Yij=1);
Pr(Yij=1) = 1/{1 + exp[7.31 + ....]} . Unfortunately. the values given for
the rest of the formula for Yij=2 and Yij=3.

My questions are:
1) Why v1 is 7.31 and not -7.31
2) What are the values for v2 and v3

Thanks David for your reply. Can you be more specific?

Best wishes,

Kamarul
Post by K Imran M
Hi everyone,
I need help to identify the values for intercept and thresholds in the
equations to calculate the probability (based on cumulative link models).
On page 209 in Longitudinal Data Analysis book by Hedeker, the
Pr(Yij=1) = 1/{1 + exp[-(v1 -(xijB+zijV))]}
Pr(Yij=2) = 1/{1 + exp[-(v2 -(xijB+zijV))]} - Pr(Yij=1)
Pr(Yij=3) = 1/{1 + exp[-(v3 -(xijB+zijV))]} - Pr(Yij=2)
Pr(Yij=4) = 1 - 1/{1 + exp[-(v3 -(xijB+zijV))]}
My question is what are the values for v1, v2 and v3?
The R scripts below shows the codes and the results from running mixor.
library(mixor)
#> Loading required package: survival
data("schizophrenia")
mixor.mod <- mixor(imps79o ~ TxDrug + SqrtWeek + TxSWeek,
data = schizophrenia, id = id, which.random.slope =
2, link = "logit")
summary(mixor.mod)
#>
#> Estimate Std. Error z value P(>|z|)
#> (Intercept) 7.318831 0.480778 15.2229 < 2.2e-16 ***
#> SqrtWeek -0.882261 0.234568 -3.7612 0.0001691 ***
#> TxDrug 0.057917 0.399102 0.1451 0.8846178
#> TxSWeek -1.694861 0.268131 -6.3210 2.598e-10 ***
#> (Intercept) (Intercept) 6.997646 1.369273 5.1105 3.213e-07 ***
#> (Intercept) SqrtWeek -1.508514 0.536023 -2.8143 0.0048888 **
#> SqrtWeek SqrtWeek 2.008916 0.453587 4.4290 9.469e-06 ***
#> Threshold2 3.901260 0.213257 18.2937 < 2.2e-16 ***
#> Threshold3 6.507172 0.289991 22.4392 < 2.2e-16 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Thank you very much.
Best wishes,
Kamarul Imran Musa
MD PhD
Universiti Sains Malaysia
Malaysia
[[alternative HTML version deleted]]
roee maor
2018-10-30 09:41:08 UTC
Permalink
Hi Kamarul,

I'm not familiar with the mixor package, but looking at your model's output
it seems that the threshold values you're looking for are Threshold2 and
Threshold3.

The first and last thresholds in any threshold model are minus infinity and
infinity, respectively. In your current model, that leaves 3 thresholds to
be recovered. To simplify calculations, one of these is assumed to be 0,
which leaves only two thresholds to estimate from the data. These two are
the last two parameters listed in your model's output.

However, I'm not familiar with package mixor, so I can't say which one of
the three thresholds is the one set to 0. In MCMCglmm it is the second
threshold, but I don't think that has to be so by necessity. Finding out
which of the thresholds is 0 may (or may not) clarify why you get a
positive value where you expect a negative one.

Best,
Roi Maor

[[alternative HTML version deleted]]
roee maor
2018-11-01 10:07:08 UTC
Permalink
Hi Kamarul,

I'm not familiar with this specific package so I don't know how to
interpret this output. I can see the standard line for "(Intercept)", but
the there is another line for "(Intercept)(Intercept)" which means nothing
to me. It makes no sense to me to add/subtract intercepts and threshold
values because intercept is a value on the y-axis and the thresholds are
values on the x-axis.

I'm putting the list back in the cc to potentially reach others who could
help.

All the best,
Roi
Dear Roi,
Really appreciate your response. Perhaps the first v1 equals 0 minus the
intercept (7.31). That gives rise to v1= -7.31.
How about v2 and v3. Can I say v2 = 3.90 and v3 = 6.51?
Best wishes,
Kamarul
Post by roee maor
Hi Kamarul,
I'm not familiar with the mixor package, but looking at your model's output
it seems that the threshold values you're looking for are Threshold2 and
Threshold3.
The first and last thresholds in any threshold model are minus infinity and
infinity, respectively. In your current model, that leaves 3 thresholds to
be recovered. To simplify calculations, one of these is assumed to be 0,
which leaves only two thresholds to estimate from the data. These two are
the last two parameters listed in your model's output.
However, I'm not familiar with package mixor, so I can't say which one of
the three thresholds is the one set to 0. In MCMCglmm it is the second
threshold, but I don't think that has to be so by necessity. Finding out
which of the thresholds is 0 may (or may not) clarify why you get a
positive value where you expect a negative one.
Best,
Roi Maor
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Roi Maor
PhD candidate
School of Zoology, Tel Aviv University
Centre for Biodiversity and Environment Research, UCL

[[alternative HTML version deleted]]
K Imran M
2018-11-02 01:54:43 UTC
Permalink
Dear Roi,

Really appreciate it.

Regards,
Kamarul
Post by roee maor
Hi Kamarul,
I'm not familiar with this specific package so I don't know how to
interpret this output. I can see the standard line for "(Intercept)", but
the there is another line for "(Intercept)(Intercept)" which means nothing
to me. It makes no sense to me to add/subtract intercepts and threshold
values because intercept is a value on the y-axis and the thresholds are
values on the x-axis.
I'm putting the list back in the cc to potentially reach others who could
help.
All the best,
Roi
Dear Roi,
Really appreciate your response. Perhaps the first v1 equals 0 minus the
intercept (7.31). That gives rise to v1= -7.31.
How about v2 and v3. Can I say v2 = 3.90 and v3 = 6.51?
Best wishes,
Kamarul
Post by roee maor
Hi Kamarul,
I'm not familiar with the mixor package, but looking at your model's output
it seems that the threshold values you're looking for are Threshold2 and
Threshold3.
The first and last thresholds in any threshold model are minus infinity and
infinity, respectively. In your current model, that leaves 3 thresholds to
be recovered. To simplify calculations, one of these is assumed to be 0,
which leaves only two thresholds to estimate from the data. These two are
the last two parameters listed in your model's output.
However, I'm not familiar with package mixor, so I can't say which one of
the three thresholds is the one set to 0. In MCMCglmm it is the second
threshold, but I don't think that has to be so by necessity. Finding out
which of the thresholds is 0 may (or may not) clarify why you get a
positive value where you expect a negative one.
Best,
Roi Maor
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Roi Maor
PhD candidate
School of Zoology, Tel Aviv University
Centre for Biodiversity and Environment Research, UCL
[[alternative HTML version deleted]]

Loading...