search for: sigmax

Displaying 5 results from an estimated 5 matches for "sigmax".

Did you mean: sigma
2005 Mar 18
1
Bivariate normal distribution and correlation
Suppose I know the value of cumulative bivariate standard normal distribution. How can I solve correlation between variables? Pekka --------------------------------- [[alternative HTML version deleted]]
2008 Jan 23
2
from a normal bivariate distribution to the marginal one
...e is a command to calculate an integral. In particular I simulated a bivariate normal distribution using these simple lines: rbivnorm <- function(n, # sample size mux, # expected value of x muy, # expected value of Y sigmax, # standard deviation of X sigmay, # standard deviation of Y rho){ # correlation coefficient x <- rnorm(n,mux,sigmax) y <- rnorm(n,muy+rho*sigmay*(x-mux)/sigmax, sigmay*sqrt(1-rho2)) cbind(x,y)...
2007 Jan 04
1
Parameter changes and segfault when calling C code through .Call
...# include <R.h> # include <Rinternals.h> # include <Rmath.h> # include <gsl/gsl_matrix.h> # include <gsl/gsl_vector.h> # include <gsl/gsl_blas.h> # include <gsl/gsl_linalg.h> # include <gsl/gsl_math.h> SEXP R_mvnorm_logpdf (SEXP xx, SEXP mux, SEXP sigmax, SEXP kx) { int k = INTEGER(kx)[0]; double * xAr = REAL(xx); double * muAr = REAL(mux); double * sigmaAr = REAL(sigmax); SEXP res; gsl_vector_view xView = gsl_vector_view_array(xAr,k); gsl_vector_view muView = gsl_vector_view_array(muAr,k); gsl_matrix_view sigmaView = gsl_matrix...
2007 Jul 02
2
how to use mle with a defined function
Hi all, I am trying to use mle() to find a self-defined function. Here is my function: test <- function(a=0.1, b=0.1, c=0.001, e=0.2){ # omega is the known covariance matrix, Y is the response vector, X is the explanatory matrix odet = unlist(determinant(omega))[1] # do cholesky decomposition C = chol(omega) # transform data U = t(C)%*%Y WW=t(C)%*%X beta = lm(U~W)$coef Z=Y-X%*%beta
2001 Nov 05
1
Why doesn't outer work?
...function sx<-function(x) { u<-p.vec[2]*x+p.vec[1]; if(u>=0.7) u<-0.7; if(u<0) u<-0; return(u); } #flowering functiom fx<-function(x) { u<-exp(p.vec[3]+p.vec[4]*x); return(u/(1+u)); } #growth function gxy<-function(x,y) { sigmax2<-p.vec[7]; sigmax<-sqrt(sigmax2); mux<-p.vec[5]+p.vec[6]*x; fac1<-sqrt(2*pi)*sigmax; fac2<-((y-mux)^2)/(2*sigmax2); return(exp(-fac2)/fac1); } #survival-growth function pxy<-function(x,y) { return(sx(x)*(1-fx(x))*gxy(x,y)) } #fecundity function fxy<-function(x,y) { n...