similar to: Reproducible Rterm crash. (PR#7072)

Displaying 20 results from an estimated 4000 matches similar to: "Reproducible Rterm crash. (PR#7072)"

2010 Feb 20
1
Add lines (contours) to lattice wireframe plot
Hi, I draw a surface corresponding to bivariate density of independent variables (rho=0) using persp(). Then I add a contour line (i.e., circle in my case) at a particular density. Below is a minimal example of what I have so far. # Bivariate density dnorm2d <- function(x, y, rho = 0) { xoy = (x^2 - 2 * rho * x * y + y^2)/(2 * (1 - rho^2)) density = exp(-xoy)/(2 * pi * sqrt(1 - rho^2))
2004 Oct 17
3
how to draw a multivariate function
Hi, Rusers: Thanks for answering my last questions. I am frustrated in plotting a trinomial pmf function f(x,y | n, pa, pb) = factorial(n)/ (factorial(x) * factorial(y) * factorial (n-x-y))* pa^x * pb^y * ((1-pa-pb)^(n-x-y)) obviously it is a bivariate function of x and y. But I have put a lot of time on this. ********************************** x <- seq(0, n, len = n/2+1) # for now I set
2010 Apr 06
2
checking bivariate normality
x <- iris$Sepal.Length[1:50]/iris$Sepal.Width[1:50] y <- iris$Petal.Length[1:50]/iris$Petal.Width[1:50] I want to check whether (x,y) follows a bivariate normal distribution or not, using density plot or scatter plot. Is it possible to plot a bivariate density in R. I cant find any. Arindam Fadikar M.Stat Indian Statistical Institute. New Delhi, India [[alternative HTML version
2011 May 16
2
wireframe advice - with reproducible code
Dear List, i am trying to produce a 3d plot using wireframe using the code: wireframe(Residuals_FD ~ Elevation * Temperature, data = data2, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE) As you can see when the code (using the data below) is run the plot area is set-up correctly but the actual surface is missing? Any help would be greatly appreciated. Chris #data Elevation
2012 Mar 28
4
Grafico en 3D
Buenas tardes, Podria por favor alguien ayudarme a descifrar por que no es posible ver la grafica 3D cuando se utiliza lattice? Ya se que algunas veces los duendes hacen de las suyas, pero no estoy seguro de que este sea el caso. He reiniciado R, cambiado a RStudio y utilizado XP, pero no pasa "nada". Mi sessionInfo() es: R version 2.14.0 Patched (2011-11-12 r57642) Platform:
2008 Jan 23
2
from a normal bivariate distribution to the marginal one
Hello, I'm quite new with R and so I would like to know if there 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
2012 Apr 19
3
Bivariate normal integral
hello, I'm trying to improve the speed of my calculation but didn't get to a satisfying result. It's about the numerical Integration of a bivariate normal distribution. The code I'm currently using x <- qnorm(seq(.Machine$double.xmin,c(1-2*.Machine$double.eps),by=0.01), mean=0,sd=1) rho <- 0.5 integral <- function(rho,x1){
2003 Feb 10
2
Wireframe (lattice) questions
I have a few questions on formatting wireframe plots: 1. How can I remove (or at least "white-out") the border on the plot? (I.e., the 2-d box around the whole plotting area, not the 3-d cube). I'm willing to hack the code if necessary. 2. Is it possible to suppress plotting of all sides of the cube except for the axes? 3. Is there a reliable way to print expressions in
2001 Nov 05
1
Why doesn't outer work?
Hello I'm a population ecologist and use R for all my stats and modelling. Recently I have been using R to numerically solve integral projection models. This involves constructing several large matrices. The current code by Easterling (Size-specific sensitivity: Applying a new structured population model. Ecology, 2000, 81, 694-708) uses nested loops to construct the matrices. To speed up the
2012 Oct 30
0
lapply and kernelUD (adehabitatHR package): Home Range kernel estimation for a list of individuals
Dear R experts, I'm using the adehabitatHR package in order to perform a kernel analysis and estimate the home range of my input data (GPS relocations of 42 individuals). I've done the analysis for one of the individuals and it worked perfectly (see code below). But now I'm trying to use a list and call the function lapply to do the same thing through all the 42 individuals (also see
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ... # Standard deviations and correlation sig_x <- 1 sig_y <- 1 rho_xy <- 0.0 # Covariance between X and Y sig_xy <- rho_xy * sig_x *sig_y # Covariance matrix Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2009 May 06
0
bivariate normal and rho
Hi, Let f(rho) = E[F_1(x) F_2(y)], i.e f(rho) is the expectation of F(x) * F(y) with respect to the bivariate Gaussian density with mean 0 and covariance matrix [1 rho; rho 1]. Moreover, assume F_1(x) and F_2(y) to be increasing functions of x and y respectively. I was wondering if it was true that f(rho) is an increasing function of rho. If so, are there any references? Best, Agos
2006 Sep 11
3
wireplot margins and additional z-axis
Dear R experts, it would be very kind if you could help me with two wireplot problems. First, when I make a wireplot and transform it into an .eps using the postscript function the eps-file leaves always a lot of space below the plot, as if it would leave space for a legend or something like that. How can i get the plot into the bottom corner without the space below? The space is not there when
2002 May 01
3
bivariate normal cdf and rho
Suppose F(x, y; rho) is the cdf of a bivariate normal distribution, with standardized marginals and correlation parameter rho. For any fixed x and y, I wonder if F(x, y; rho) is a monotone increasing function of rho, i.e., there is a 1 to 1 map from rho to F(x, y; rho). I explored it using the function pmvnorm in package mvtnorm with different x and y. The plot suggests the statement may be true.
2017 Mar 19
2
outer not applying a constant function
Hi, the function outer can not apply a constant function as in the last line of the following example: > xg <- 1:4 > yg <- 1:4 > fxyg <- outer(xg, yg, function(x,y) x*y) > fconstg <- outer(xg, yg, function(x,y) 1.0) Error in outer(xg, yg, function(x, y) 1) : dims [product 16] do not match the length of object [1] Of course there are simpler ways to construct a constant
2015 Jul 27
0
[LLVMdev] Let expressions at file scope combined with defm
Hi all, I try to run such a line in TableGen but seems it's not working. What is the problem with this code? multiclass cond { let Inst{1-0}=0b11 in defm fxy: ConditionalALU; .... } I receive this error: test.td:162:11: error: expected '=' in let expression let Inst{1-0}=0b11 in defm fxy: ConditionalALU; ^ -------------- next part -------------- An HTML
2017 Mar 20
0
outer not applying a constant function
>>>>> Gebhardt, Albrecht <Albrecht.Gebhardt at aau.at> >>>>> on Sun, 19 Mar 2017 09:14:56 +0000 writes: > Hi, > the function outer can not apply a constant function as in the last line of the following example: >> xg <- 1:4 >> yg <- 1:4 >> fxyg <- outer(xg, yg, function(x,y) x*y) >> fconstg
2006 Oct 27
0
VGAM package released on CRAN
Dear useRs, upon request, the VGAM package (currently version 0.7-1) has been officially released on CRAN (the package has been at my website http://www.stat.auckland.ac.nz/~yee/VGAM for a number of years now). VGAM implements a general framework for several classes of regression models using iteratively reweighted least squares (IRLS). The key ideas are Fisher scoring, generalized linear and
2008 Mar 22
1
Vectorization Problem
I have the code for the bivariate Gaussian copula. It is written with for-loops, it works, but I wonder if there is a way to vectorize the function. I don't see how outer() can be used in this case, but maybe one can use mapply() or Vectorize() in some way? Could anyone help me, please? ## Density of Gauss Copula rho <- 0.5 #corr R <- rbind(c(1,rho),c(rho,1)) #vcov matrix id <-
2017 Mar 20
1
outer not applying a constant function
> Or is this a bad idea? I don't like the proposal. I have seen code like the following (in fact, I have written such code, where I had forgotten a function was not vectorized) where the error would have been discovered much later if outer() didn't catch it. > outer(1:3, 11:13, sum) Error in outer(1:3, 11:13, sum) : dims [product 9] do not match the length of object [1]