Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
MRDCr
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
leg
MRDCr
Commits
a9725a4f
Commit
a9725a4f
authored
May 21, 2016
by
Eduardo E. R. Junior
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrige intervalo de y a ser primeiramente avaliado
parent
eb1b9609
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
R/cmp.R
R/cmp.R
+7
-5
No files found.
R/cmp.R
View file @
a9725a4f
...
...
@@ -266,8 +266,9 @@ calc_mean_cmp <- function(lambda, nu, sumto, tol = 1e-5) {
names
(
nu
)
<-
NULL
pars
<-
data.frame
(
lambda
=
lambda
,
nu
=
nu
)
## Calcula o ymax usando mu + 5 (sqrt(sigma))
sigma
<-
lambda
^
(
1
/
nu
)
/
nu
-
(
nu
-
1
)
/
(
2
*
nu
^
2
)
ymax
<-
with
(
pars
,
ceiling
(
max
(
lambda
+
5
*
sqrt
(
sigma
))))
approxmu
<-
lambda
^
(
1
/
nu
)
-
(
nu
-
1
)
/
(
2
*
nu
)
sigma
<-
(
1
/
nu
)
*
approxmu
ymax
<-
with
(
pars
,
ceiling
(
max
(
approxmu
+
5
*
sqrt
(
sigma
))))
## Agora verifica se a prob(ymax) é de fato pequena, se não, soma 1.
lambdamax
<-
max
(
pars
$
lambda
)
numin
<-
min
(
pars
$
nu
)
...
...
@@ -317,9 +318,10 @@ calc_var_cmp <- function(lambda, nu, sumto, tol = 1e-5) {
names
(
lambda
)
<-
NULL
names
(
nu
)
<-
NULL
pars
<-
data.frame
(
lambda
=
lambda
,
nu
=
nu
)
# Calcula o ymax usando mu + 5 (sqrt(sigma))
sigma
<-
lambda
^
(
1
/
nu
)
/
nu
-
(
nu
-
1
)
/
(
2
*
nu
^
2
)
ymax
<-
with
(
pars
,
ceiling
(
max
(
lambda
+
5
*
sqrt
(
sigma
))))
## Calcula o ymax usando mu + 5 (sqrt(sigma))
approxmu
<-
lambda
^
(
1
/
nu
)
-
(
nu
-
1
)
/
(
2
*
nu
)
sigma
<-
(
1
/
nu
)
*
approxmu
ymax
<-
with
(
pars
,
ceiling
(
max
(
approxmu
+
5
*
sqrt
(
sigma
))))
# Agora verifica se a prob(ymax) é de fato pequena, se não, soma 1.
lambdamax
<-
max
(
pars
$
lambda
)
numin
<-
min
(
pars
$
nu
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment