Re: [R] Multivariate skew-t cdf

2006-06-06 Thread Konrad Banachewicz

 Thanks to Spencer Graves for provinding this clarification about pmst.
 As the author of pmst, I was really the one expected to answer the
 query, but  I was on travel in the last two weeks and did not read
 this query.

 As a complement to what already explained, the reason of the sharp change
 from k=19 to k=20 is as follows: pmst (package sn) calls pmt (package
 mnormt) with k increased by 1, and pmt calls a Fortran routine (written by
 Alan Genz), which issues an error if k20 or k1. Hence, the effective
 maximum number of dimensions allowed by pmst is 19.


Ok, thanks a lot to both of You for help - with Your explanations, You
really clarified my view of the
problem (and saved me a lot of time I would've spent on digging through my
own code).

best wishes,
Konrad Banachewicz

best wishes,

 Adelchi Azzalini

  Also, have you asked about this directly to the maintainers of
 the
  sn, mnormt and mvtnorm packages?  They might have other
 suggestions.
 
  Hope this helps.
  Spencer Graves
 --
 We are what we pretend to be, so we must be careful about what we pretend
 to be

   Kurt Vonnegut Jr. Mother Night

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Multivariate skew-t cdf

2006-06-02 Thread Konrad Banachewicz
Dear All,
I am using the pmst function from the sn package (version 0.4-0). After
inserting the example from the help page, I get non-trivial answers, so
everything is fine. However, when I try to extend it to higher dimension:
xi - alpha - x - rep(0,27)
Omega - diag(0,27)
p1 - pmst(x, xi, Omega, alpha, df = 5)

I get the following result:

p1
[1] 0
attr(,error)
[1] 1
attr(,status)
[1] oversize

So it seems like the dimension is a problem here (and not the syntax or type
mismatch, as I inititally thought - the function is evaluated) - although I
found no warning about it in the help page.

Can anyone give me a hint as to how to work around this problem and evaluate
the skew-t cdf in a large-dimensional space? It's pretty crucial to my
current research. Thanks in advance,

Konrad

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Workspace restoration error

2006-05-05 Thread Konrad Banachewicz
Dear All,
I am working with the new release of R (2.3.0) and have the following
problem:
I started it the first time, did some computations and the saved the
workspace
upon exit. Next time I launched it, I got a message fatal error: unable to
restore saved
data in .RData.However, if I physically remove the .Rdata file from the
directory,
launch clean and manually load the old .RData file everything is working
fine.
I tried it a few times, even reinstalled the whole thing (and removing
previous versions)
and the problem remains. Can someone help me with this one? Thanks in
advance

Konrad

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Skewed t distribution

2006-03-29 Thread Konrad Banachewicz
On 3/28/06, Prof Brian Ripley [EMAIL PROTECTED] wrote:

 You need to learn to supply adequate information.  The current
 version of sn *does* have such an argument, and I was careful to check.
 So it seems that you are using an unstated obselete version of sn.
 Do ugrade as the posting guide asked you to.


 Ok, point taken, I just forgot about it and had no way to do it
before computations started (I have to work on two machines,
and the one with R on it has no access to the internet).
My apologies for wasting Your  everyone else's time.

rg,
konrad

--
 We are what we pretend to be, so we must be careful about what we pretend
 to be

   Kurt Vonnegut Jr. Mother Night

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Skewed t distribution

2006-03-28 Thread Konrad Banachewicz
Dear All,
I am working with skewed-t copula in my research recently, so I needed to
write an mle
procedure instead of using a standard fit one; I stick to the sn package. On
subsamples of the entire population that I deal with, everything is fine.
However, on the total sample (difference in cross-sectional
dimension: 30 vs 240) things go wrong - the objective function diverges to
infinity. I located the rotten line
to be

t1 - dmst(vector, mu, P, alpha, nu)

where vector is the matrix row, on which I evaluate my likelihood and the
rest in parametrized in a standard
way, just as the help pages give it. In large dimensions, I get a zero value
of the density (which is probably due to numerical issues). I tried the
following dummy example

t1 - rmst(1,mu,P,alpha, nu)
t2 - dmst(t1, mu, alpha,nu)

and t2 remains to be zero. Can anyone help me on this one?

thanks in advance,
Konrad

--
We are what we pretend to be, so we must be careful about what we pretend
to be

  Kurt Vonnegut Jr. Mother Night

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Skewed t distribution

2006-03-28 Thread Konrad Banachewicz
On 3/28/06, Prof Brian Ripley [EMAIL PROTECTED] wrote:

 Try maximizing the log-likelihood and using the log=TRUE argument to dmst.


seems like dmst does not support this argument (the way e.g. dt does)



 (You have told us so little about what you are doing that we can but guess
 at what you mean by `write an mle procedure': what is wrong with st.mle,
 for example?)


st.mle assumes skewed-t marginals (for a whole distribution), whereas
I am working with a copula so my margins are uniform. The whole point
is separating the joint and marginal dynamics.

rg,
konrad

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Skewed t distribution

2006-03-28 Thread Konrad Banachewicz
P is an identity matrix 240X240, mu and alpha are vectors of zeros
240X1, nu equals 10, so alltogether You need:
P - matrix(0,244,244)
diag(P) - 1
nu - 10
alpha - rep(0,244)
mu - rep(0,244)
require(sn)
t1 - rmst(1,mu,P, alpha, nu)
t2 - dmst(t1,mu,P,alpha,nu)




 please supply the ingredients needed to reproduce the problem that
 you have faced (including the values of the parameters mu,P,alpha,nu,
 among the rest)

 best wishes,

 Adelchi Azzalini



[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] vector autoregression

2005-08-16 Thread Konrad Banachewicz
dear All,
I have the following problem: I need to calculate an h-step ahead forecast
from a var model (estimated with a dse1 method estVARXls), which in
turn will be used as an input for another model as conditioning data, so
I need it as a simple, numeric matrix. No exogenous input is used.
 However, the standard forecast method produces a 1-element list
that includes a forecast matrix, yet I have no clue as to how to
extract the values of interest. Featherforecast and Horizonforecast
do not allow prediction only beyond the sample period, quote:
from.periods cannot exceed available output data.
any help will be much appreciated,

regards,

konrad

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] creating a plot

2004-08-17 Thread Konrad Banachewicz
Hi,
I have a time series plot to produce, yet I want the x-axis to be 
labelled with dates
(stored on another array) and not with observation numbers. Can anyone 
suggest me how?
Thanks.


  Konrad

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html