<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:18pt"><div style="font-size: 18pt;"><span><br></span></div><div>Elias... obrigada por responder...</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Então não tem como eu calcular o HPD para meus dados?</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Acontece que eu estou achando a distribuição empírica das minhas predições e gostaria de obter um certo limite</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">que me dê uma
 alta cobertura (um limite onde tenho máxima densidade)...</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Como eu poderia fazer isso??</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Att.</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Flávia Cristina</div><div style="color: rgb(0, 0, 0); font-size: 16.363636016845703px; font-family: 'times new roman', 'new york', times, serif;
 background-color: transparent; font-style: normal;"><br></div><div style="font-size: 16.363636016845703px; color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;">----------------------------------------------------------------------</span><br></div><div style="font-size: 18pt; font-family: 'times new roman', 'new york', times, serif;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div class="y_msg_container"><br>Message: 5<br>Date: Tue, 21 May 2013 18:21:57 -0300<br>From: Elias Teixeira Krainski <<a ymailto="mailto:eliaskrainski@yahoo.com.br" href="mailto:eliaskrainski@yahoo.com.br">eliaskrainski@yahoo.com.br</a>><br>To: <a ymailto="mailto:r-br@listas.c3sl.ufpr.br" href="mailto:r-br@listas.c3sl.ufpr.br">r-br@listas.c3sl.ufpr.br</a><br>Subject: Re: [R-br] Ajuda: HPD em conjunto de valores
 preditos<br>Message-ID: <<a ymailto="mailto:519BE575.5040900@yahoo.com.br" href="mailto:519BE575.5040900@yahoo.com.br">519BE575.5040900@yahoo.com.br</a>><br>Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br><br><span style="font-size: 12pt;">Faz sentido calcular HPD de uma distribuição, não de um grid de valores </span><br>como vc fez. A função HPDinterval() aplica-se especificamente a amostras <br>de uma distribuição. Você aplicou-a a uma sequencia de valores para os <br>quais foi avaliada uma densidade. Ou seja, exatamente o mesmo que fazer:<br>    HPDinterval(as.mcmc(seq(-1, 1, length=512)))<br><br>On 21/05/13 14:04, Flavia Cristina M.Queiroz wrote:<br>> Olá pessoal,<br>> Estou precisando de uma ajuda com o cálculo de intervalo de credibilidade:<br>><br>> Tenho um conjunto de dados (valores preditos) com os quais tenho que <br>> calcular o intervalo de credibilidade de predição.<br>>
 Estes valores preditos foram calculados em uma implementação de redes <br>> neurais.<br>><br>> Daí eu calculei o HPD usando a função HPDinterval(), do pacote coda.<br>> Fiz assim:<br>> despad <- read.table('vintemaio_pad.txt',h=F)<br>> dados <- as.matrix(despad)<br>> a=density(dados,bw=0.45,from = -1, to = 1)<br>> library(coda)<br>> arq<-as.mcmc(a$x)<br>> mcmcsamp(a$x)<br>> HPD<-HPDinterval(arq)<br>> HPD<br>> Contudo, meu intervalo é muito amplo.. tipo, meus dados vão de -1 a 1 <br>> e meu HPD deu [-0.9882583, 0.9138943].<br>> Porque meu intervalo deu tão amplo?? O que teria que fazer de diferente??<br>> -------------------------------------------------------------------------------<br>> Aguardo alguma dica ou solução!!<br>> Att.,<br>> Flávia Cristina<br><br><br></div> </div> </div>  </div></body></html>