Understanding the Von Mises quantile function + 95% CI?












0












$begingroup$


Given the following ts:



ts <- c("08:43:48", "09:17:52", "12:56:22", "12:27:32", "10:59:23", 
"07:22:45", "11:13:59", "10:13:26", "10:07:01", "06:09:56", "12:43:17",
"07:07:35", "09:36:44", "10:45:00", "08:27:36", "07:55:35", "11:32:56",
"13:18:35", "11:09:51", "09:46:33", "06:59:12", "10:19:36", "09:39:47",
"09:39:46", "18:23:54")


Converting to circular:



ts <- circular(ts, units = "hours", template = "clock24")

# Estimate the periodic mean from the von Mises distribution

estimates <- mle.vonmises(ts)

p_mean <- estimates$mu %% 24
concentration <- estimates$
kappa

# Estimate densities of all 25 timestamps
densities <- dvonmises(ts, mu = p_mean, kappa = concentration)


Here is what I can't figure out, given alpha = 95%:



If I need a 95% CI why I need to tell qvonmises to calculate the percentile of (1-alpha)/2 - one number only. I have 2 tails clockwise and anti clockwise.
Please clarify what I am missing here. Is it because this distribution is circular?



# Check if the densities are larger than the cutoff of 95%-CI
cutoff <- dvonmises(qvonmises((1 - alpha)/2, mu = p_mean, kappa = concentration), mu = p_mean, kappa = concentration)

# Define the variable time_feature
time_feature <- densities >= cutoff









share|cite|improve this question









$endgroup$












  • $begingroup$
    even after loading the circular package, your estimates <- mle.vonmises(ts) is giving me: Error in x/12 : non-numeric argument to binary operator
    $endgroup$
    – Henry
    Jan 20 at 19:42


















0












$begingroup$


Given the following ts:



ts <- c("08:43:48", "09:17:52", "12:56:22", "12:27:32", "10:59:23", 
"07:22:45", "11:13:59", "10:13:26", "10:07:01", "06:09:56", "12:43:17",
"07:07:35", "09:36:44", "10:45:00", "08:27:36", "07:55:35", "11:32:56",
"13:18:35", "11:09:51", "09:46:33", "06:59:12", "10:19:36", "09:39:47",
"09:39:46", "18:23:54")


Converting to circular:



ts <- circular(ts, units = "hours", template = "clock24")

# Estimate the periodic mean from the von Mises distribution

estimates <- mle.vonmises(ts)

p_mean <- estimates$mu %% 24
concentration <- estimates$
kappa

# Estimate densities of all 25 timestamps
densities <- dvonmises(ts, mu = p_mean, kappa = concentration)


Here is what I can't figure out, given alpha = 95%:



If I need a 95% CI why I need to tell qvonmises to calculate the percentile of (1-alpha)/2 - one number only. I have 2 tails clockwise and anti clockwise.
Please clarify what I am missing here. Is it because this distribution is circular?



# Check if the densities are larger than the cutoff of 95%-CI
cutoff <- dvonmises(qvonmises((1 - alpha)/2, mu = p_mean, kappa = concentration), mu = p_mean, kappa = concentration)

# Define the variable time_feature
time_feature <- densities >= cutoff









share|cite|improve this question









$endgroup$












  • $begingroup$
    even after loading the circular package, your estimates <- mle.vonmises(ts) is giving me: Error in x/12 : non-numeric argument to binary operator
    $endgroup$
    – Henry
    Jan 20 at 19:42
















0












0








0





$begingroup$


Given the following ts:



ts <- c("08:43:48", "09:17:52", "12:56:22", "12:27:32", "10:59:23", 
"07:22:45", "11:13:59", "10:13:26", "10:07:01", "06:09:56", "12:43:17",
"07:07:35", "09:36:44", "10:45:00", "08:27:36", "07:55:35", "11:32:56",
"13:18:35", "11:09:51", "09:46:33", "06:59:12", "10:19:36", "09:39:47",
"09:39:46", "18:23:54")


Converting to circular:



ts <- circular(ts, units = "hours", template = "clock24")

# Estimate the periodic mean from the von Mises distribution

estimates <- mle.vonmises(ts)

p_mean <- estimates$mu %% 24
concentration <- estimates$
kappa

# Estimate densities of all 25 timestamps
densities <- dvonmises(ts, mu = p_mean, kappa = concentration)


Here is what I can't figure out, given alpha = 95%:



If I need a 95% CI why I need to tell qvonmises to calculate the percentile of (1-alpha)/2 - one number only. I have 2 tails clockwise and anti clockwise.
Please clarify what I am missing here. Is it because this distribution is circular?



# Check if the densities are larger than the cutoff of 95%-CI
cutoff <- dvonmises(qvonmises((1 - alpha)/2, mu = p_mean, kappa = concentration), mu = p_mean, kappa = concentration)

# Define the variable time_feature
time_feature <- densities >= cutoff









share|cite|improve this question









$endgroup$




Given the following ts:



ts <- c("08:43:48", "09:17:52", "12:56:22", "12:27:32", "10:59:23", 
"07:22:45", "11:13:59", "10:13:26", "10:07:01", "06:09:56", "12:43:17",
"07:07:35", "09:36:44", "10:45:00", "08:27:36", "07:55:35", "11:32:56",
"13:18:35", "11:09:51", "09:46:33", "06:59:12", "10:19:36", "09:39:47",
"09:39:46", "18:23:54")


Converting to circular:



ts <- circular(ts, units = "hours", template = "clock24")

# Estimate the periodic mean from the von Mises distribution

estimates <- mle.vonmises(ts)

p_mean <- estimates$mu %% 24
concentration <- estimates$
kappa

# Estimate densities of all 25 timestamps
densities <- dvonmises(ts, mu = p_mean, kappa = concentration)


Here is what I can't figure out, given alpha = 95%:



If I need a 95% CI why I need to tell qvonmises to calculate the percentile of (1-alpha)/2 - one number only. I have 2 tails clockwise and anti clockwise.
Please clarify what I am missing here. Is it because this distribution is circular?



# Check if the densities are larger than the cutoff of 95%-CI
cutoff <- dvonmises(qvonmises((1 - alpha)/2, mu = p_mean, kappa = concentration), mu = p_mean, kappa = concentration)

# Define the variable time_feature
time_feature <- densities >= cutoff






statistics probability-distributions confidence-interval quantile






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 19 at 17:39









SteveSSteveS

13413




13413












  • $begingroup$
    even after loading the circular package, your estimates <- mle.vonmises(ts) is giving me: Error in x/12 : non-numeric argument to binary operator
    $endgroup$
    – Henry
    Jan 20 at 19:42




















  • $begingroup$
    even after loading the circular package, your estimates <- mle.vonmises(ts) is giving me: Error in x/12 : non-numeric argument to binary operator
    $endgroup$
    – Henry
    Jan 20 at 19:42


















$begingroup$
even after loading the circular package, your estimates <- mle.vonmises(ts) is giving me: Error in x/12 : non-numeric argument to binary operator
$endgroup$
– Henry
Jan 20 at 19:42






$begingroup$
even after loading the circular package, your estimates <- mle.vonmises(ts) is giving me: Error in x/12 : non-numeric argument to binary operator
$endgroup$
– Henry
Jan 20 at 19:42












0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3079605%2funderstanding-the-von-mises-quantile-function-95-ci%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3079605%2funderstanding-the-von-mises-quantile-function-95-ci%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith