Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rpackages
IDF
Commits
9f5cf399
Commit
9f5cf399
authored
Jan 21, 2020
by
Oscar Jurado
Browse files
added theta_zero option to function, created ifelse for likelihood
parent
cc5382ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
R/gevdfit.R
R/gevdfit.R
+2
-2
No files found.
R/gevdfit.R
View file @
9f5cf399
...
...
@@ -76,7 +76,7 @@ gev.d.fit<-
mulink
=
make.link
(
"identity"
),
siglink
=
make.link
(
"identity"
),
shlink
=
make.link
(
"identity"
),
thetalink
=
make.link
(
"identity"
),
etalink
=
make.link
(
"identity"
),
muinit
=
NULL
,
siginit
=
NULL
,
shinit
=
NULL
,
thetainit
=
NULL
,
etainit
=
NULL
,
show
=
TRUE
,
method
=
"Nelder-Mead"
,
maxit
=
10000
,
init.vals
=
NULL
,
...
)
show
=
TRUE
,
method
=
"Nelder-Mead"
,
maxit
=
10000
,
init.vals
=
NULL
,
theta_zero
=
FALSE
,
...
)
{
z
<-
list
()
...
...
@@ -172,7 +172,7 @@ gev.d.fit<-
mu
<-
mulink
$
linkinv
(
mumat
%*%
(
a
[
1
:
npmu
]))
sigma
<-
siglink
$
linkinv
(
sigmat
%*%
(
a
[
seq
(
npmu
+
1
,
length
=
npsc
)]))
xi
<-
shlink
$
linkinv
(
shmat
%*%
(
a
[
seq
(
npmu
+
npsc
+
1
,
length
=
npsh
)]))
theta
<-
thetalink
$
linkinv
(
thmat
%*%
(
a
[
seq
(
npmu
+
npsc
+
npsh
+
1
,
length
=
npth
)]))
ifelse
(
theta_zero
,
theta
<-
thetalink
$
linkinv
(
thmat
%*%
(
a
[
seq
(
npmu
+
npsc
+
npsh
+
1
,
length
=
npth
)]))
,
theta
<-
0
)
eta
<-
etalink
$
linkinv
(
etmat
%*%
(
a
[
seq
(
npmu
+
npsc
+
npsh
+
npth
+
1
,
length
=
npet
)]))
ds.t
<-
ds
+
theta
...
...
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