Displaying 20 results from an estimated 4000 matches similar to: "python"
2005 Jul 26
1
Wishart Density
Dear R users,
I am doing MCMC using Metropolis-Hastings. My model is
bivariate-log-normal and the prior for variance-covariance is wishart
distribution. I am wondering if there are some simple codes about how
to get the density of Wishart distribution in my case ?
Thanks in advance.
Meihua
[[alternative HTML version deleted]]
2012 Mar 01
1
Parameterization of Inverse Wishart distribution available in MCMCpack and bayesm libraries
Hello Everyone
Both the MCMCpack and the bayesm libraries allow us to make draws from the
Inverse Wishart distribution.
But I wanted to find out how exactly is the Inverse Wishart distribution
parameterized in these libraries.
The reason I ask is the following:
Now its generally standard to express Inverse Wishart as IW(0.5 * DOF,0.5*
Scale). (DOF-> Degree of freedom, Scale -> Scale
2012 Feb 05
1
Simulating from a Normal Inverted Wishart distribution
Hello everyone
I was wondering how would one simulate from a Normal Wishart Distribution
in R.
A normal inverted Wishart distribution is denoted by NIW (M,C,d,S), where
X/(Sigma) ~ N( M,C,(Sigma) ) -> a matrix normal distribution, (Sigma) ->
column dispersion matrix
(Sigma) ~ IW (d,S) -> inverted Wishart distribution
Thanks a lot !
Best
Shantanu
[[alternative HTML version
2003 Mar 31
2
Does R have an inverse wishart distribution?
If so, I''ve had trouble finding it. Can anyone help?
2005 Dec 25
4
Portability and Memory Issues for R-package
I have an upcoming JASA paper with an iid sampling algorithm for Bayesian Generalized Linear models (e.g., Logit, Poisson Regression, and Conditional Logit models with multivariate normal priors). At this point, I have implemented the algorithms in C and hope to make the functions and corresponding source code available through an R package. I have successfully created the code necessary to
2010 Sep 06
1
sample a matrix with one element to be 1 from wishart distribution
Hi,
I am not sure if this make sense at all. I'd like to sample a matrix, which
follows a wishart / inverted wishart distribution. However, the (1,1)
element of this matrix should always be equal to 1. How can I handle it in
R? Any suggestion is greatly appreciated. Thanks a lot.
Sonia
[[alternative HTML version deleted]]
2005 Apr 28
1
riwish() problem
R users-
In moving from R 2.0.0 to R 2.1.0 in Windows, I have encountered a problem
with the "riwish" command in the package "MCMCpack". I've searched the
documentation and can't seem to figure it out. For example:
Define a matrix:
> lam <- matrix(c(.00233,-.00057,-.00057,.00190),2,2)
and then use the riwish command to generate a random inverse-Wishart
2003 Feb 16
1
multivariate sampling question again
Hi
Thanks for replying my question! What really interested me is that the
package providing some complex form sampling, such as wishart,
multinomial, dirichlet. And others for example conditional beta
distribution confining the random variable in the interval (a, b). Since
these concept are widely used in the baysian, I wonder whether somebody
has already written this package. Thanks!
Best
2010 Sep 28
13
Reading Puppet reports with Python
Has anyone got/seen Python code to read puppet reports?
I added a bunch of these:
class PuppetReport(yaml.YAMLObject):
yaml_tag = u''!ruby/object:Puppet::Transaction::Report''
def __init__(self, host, logs, metrics, records, time):
self.host = host
self.logs = logs
self.metrics = metrics
self.records = records
self.time = time
However, the Python YAML
2006 Oct 20
1
mcmcsamp - How does it work?
Hello,
I am a chemical student and I make use of 'lme/lmer function'
to handle experiments in split-plot structures.
I know about the mcmcsamp and I think that it's very promissory.
I would like knowing "the concept behind" of the mcmcsamp function.
I do not want the C code of the MCMCSAMP function.
I would like to get the "pseudo-algorithm" to understanding
that
2015 Apr 23
3
Usar una matriz sparse desde python a R
Hola erreros
Estoy rizando el rizo con esto de las matrices sparse y he encontrado la forma de hacerlo en python, que va rapidÃsimo. Por tanto tengo una matriz sparse en un objeto python con esta info:
<138493x26744 sparse matrix of type '<type 'numpy.int64'>
Quiero hacer lo mismo con R pero me he topado con la lentitud de los bucles para rellenar la sparse (también por mi
2018 Apr 06
3
Semi-OT: install python package in userspace
On 04/06/18 13:51, Ulf Volmer wrote:
> On 06.04.2018 18:25, m.roth at 5-cent.us wrote:
>> CentOS 7 box. As there's no package in any of the repos, we're trying to
>> install scikit-learn in the user's space. It refuses. My late try was,
>> after d/l a .whl from last year, hoping that would work with the numpy
>> package in the regular repos, I did a pip
2008 Sep 26
1
Generating a valid covariance matrix
I want to generate a valid variance-covariance matrix. One way could be to generate some random sample from multivariate normal distribution and then calculate cov. matrix. Another way could be to sample from wishart distribution itself. However both cases need a valid i.e. PD covariance matrix. As I need to generate that covariance matrix only, I am not interested those two methods. Can anyone
2007 Jul 24
1
function optimization: reducing the computing time
Dear useRs,
I have written a function that implements a Bayesian method to
compare a patient's score on two tasks with that of a small control
group, as described in Crawford, J. and Garthwaite, P. (2007).
Comparison of a single case to a control or normative sample in
neuropsychology: Development of a bayesian approach. Cognitive
Neuropsychology, 24(4):343?372.
The function (see
2012 Dec 19
1
Theoretical confidence regions for any non-symmetric bivariate statistical distributions
Respected R Users,
I looking for help with generating theoretical confidence regions for any
of non-symmetric bivariate statistical distributions (bivariate Chi-squared
distribution<Wishart distribution>, bivariate F-distribution, or any of the
others). I want to to used it as a benchmark to compare a few strategies
constructing confidence regions for non-symmetric bivariate data.
There is
2006 Oct 12
3
multithreading calling from the rpy Python package
Hello,
I don't know if this question ought to go here, or rather on R-devel,
so please bear with me.
I'm interfacing to R via RPy (rpy.sf.net) and an embedded Python
interpreter. This is really quite convenient.
I use this approach to calculate the correlation coefficient of 1
independent dataset (vector) with 4 dependent vectors. It'd be nice if
that could be done in 4 parallel
2006 Oct 12
3
multithreading calling from the rpy Python package
Hello,
I don't know if this question ought to go here, or rather on R-devel,
so please bear with me.
I'm interfacing to R via RPy (rpy.sf.net) and an embedded Python
interpreter. This is really quite convenient.
I use this approach to calculate the correlation coefficient of 1
independent dataset (vector) with 4 dependent vectors. It'd be nice if
that could be done in 4 parallel
2011 Feb 24
2
MCMCpack combining chains
Deal all, as MCMClogit does not allow for the specification of several chains, I have run my model 3 times with different random number seeds and differently dispersed multivariate normal priors.
For example:
res1 = MCMClogit(y~x,b0=0,B0=0.001,data=mydat, burnin=500, mcmc=5500, seed=1234, thin=5)
res2 = MCMClogit(y~x,b0=1,B0=0.01,data=mydat, burnin=500, mcmc=5500, seed=5678, thin=5)
res3 =
2018 Apr 06
4
Semi-OT: install python package in userspace
Valeri Galtsev wrote:
<snip>
>>> On Fri, 6 Apr 2018 17:25 , <m.roth at 5-cent.us> wrote:
>>>
>>>> CentOS 7 box. As there's no package in any of the repos, we're trying
>>>> to install scikit-learn in the user's space. It refuses. My late try
was,
>>>> after d/l a .whl from last year, hoping that would work with the numpy
2010 May 20
1
Geneland error on unix: Error in MCMC(........ :, unused argument(s) (ploidy = 2, genotypes = geno)
I am receiving the above error ( full r session output below) the
script runs OK in windows. and "genotypes" and "ploidy" are both
correct arguments
any suggestions would be most welcome
Nevil Amos
MERG/ACB
Monash University School of Biological Sciences
> library(Geneland)
Loading required package: RandomFields
Loading required package: fields
Loading required