Displaying 20 results from an estimated 1351 matches for "0.25".
Did you mean:
0.2
2011 May 05
1
matrix not positive definite (while it should be)
I do have some trouble with matrices. I want to build up a covariance matrix
with a hierarchical structure). For instance, in dimension n=10, I have two
subgroups (called REGION).
NR=2; n=10
CORRELATION=matrix(c(0.4,-0.25,
-0.25,0.3),NR,NR)
REGION=sample(1:NR,size=n,replace=TRUE)
R1=REGION%*%t(rep(1,n))
R2=rep(1,n)%*%t(REGION)
SIGMA=matrix(NA,n,n)
for(i in 1:NR){
for(j in
2011 Feb 20
1
Conditional sum
Hi,
I have a DF like this:
DF = data.frame(read.table(textConnection(" A B C
1 b1 1999 0.25
2 c1 1999 0.25
3 d1 1999 0.25
4 a2 1999 0.25
5 c2 1999 0.25
6 d2 1999 0.25
7 a3 1999 0.25
8 b3 1999 0.25
9 d3 1999 0.25
10 a4 1999 0.25
11 b4 1999 0.25
12 c4 1999 0.25
13 b1 2001 0.5
14 a2 2001 0.5
15 b1 2004 0.33
16 c1 2004 0.33
17 a2 2004 0.33
18 c2 2004
2011 Jan 11
5
A question on dummy variable
Dear all, I would like to ask one question related to statistics, for
specifically on defining dummy variables. As of now, I have come across 3
different kind of dummy variables (assuming I am working with Seasonal
dummy, and number of season is 4):
> dummy1 <- diag(4)
> for(i in 1:3) dummy1 <- rbind(dummy1, diag(4))
> dummy1 <- dummy1[,-4]
>
> dummy2 <- dummy1
>
2008 Jan 08
1
using mapply()
useR's,
This is a follow up question to one I previously asked. Consider the
3-element list below
> res
[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[,13] [,14]
[1,] NA NA NA 1.25 0.25 0.75 NA NA NA NA NA NA 1.25
0.25
[2,] 1.25 0.25 0.75 NA NA NA NA NA NA 1.25 0.25 0.75 NA
NA
[3,] NA NA NA NA NA
2004 Sep 14
3
Signs of loadings from princomp on Windows
I start a clean session of R 1.9.1 on Windows and I run the following code:
> library(MASS)
> data(painters)
> pca.painters <- princomp(painters[ ,1:4])
> loadings(pca.painters)
Loadings:
Comp.1 Comp.2 Comp.3 Comp.4
Composition 0.484 -0.376 0.784 -0.101
Drawing 0.424 0.187 -0.280 -0.841
Colour -0.381 -0.845 -0.211 -0.310
Expression 0.664 -0.330 -0.513
2010 Jul 20
2
Problem with command apply
I try to utilize some operations on rows in a matrix using command 'apply'
but find a problem.
First I write a simple function to normalize a vector (ignore error
handling) as follows:
normalize = function( v ) {
return( ( v-min(v) ) / ( max(v) - min(v) ) )
}
The function works fine for a vector:
> normalize( 1:5 )
[1] 0.00 0.25 0.50 0.75 1.00
Then I generate a matrix:
> a =
2012 Nov 30
3
repeating matrices in a list
Suppose I have the following square, non-negative matrices
> g=matrix(c(0,2,4,0.25,0,0,0,0.6,0),3,3,byrow=T);
I want to create a list where this matrix is repeated multiple times. if I
do this brute force (manually), using
> env <- list(g,g,g)
works fine. Yields
[[1]]
[,1] [,2] [,3]
[1,] 0.00 2.0 4
[2,] 0.25 0.0 0
[3,] 0.00 0.6 0
[[2]]
[,1] [,2] [,3]
[1,]
2012 Mar 12
2
How to create interrupted boxplot
Hello,
I have created two boxplots with following R code. There is one outlier in
B group.
The outlier is 33. But the all other data are between 0 to 4.
How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I
want keep the outlier in my boxplot.
I want my boxplot look like the second one, keep the outlier, and make an
interrupt of y-axis from 5 to 25.
Thanks,
Jianghong
2008 Jan 08
1
using lapply()
useR's,
I am trying to find a quick way to change some values in a list that are
subject to a condition to be NA. Consider the 3x1 matrix:
delta <- matrix(c(2.5,2.5,1), nrow = 1)
And consider the list named v that has 3 elements
> v
v[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[,13] [,14]
[1,] 4.25 3.25 2.25 1.25 0.25 0.75 1.75 2.75 3.75 4.25
2006 Aug 11
1
x tick labels - sparse?
Hi,
I'm stuck on creating a plot with x tick labels for every Nth tick
mark - how is that done? I don't see a simple solution to this in
help(plot) or help(par) and what I've tried is not working, eg, the
following does not work, although it seems intuitive to me that it
should work:
x <- seq(-100,1000,25)
y <- x * x
% find all the x values that are multiples of 100
tmp <-
2008 Nov 15
0
CESA-2008:0977 Critical CentOS 3 s490(x) seamonkey - security update
CentOS Errata and Security Advisory 2008:0977
https://rhn.redhat.com/errata/RHSA-2008-0977.html
The following updated files have been uploaded and are currently
syncing to the mirrors:
s390:
updates/s390/RPMS/seamonkey-1.0.9-0.25.el3.centos3.s390.rpm
updates/s390/RPMS/seamonkey-chat-1.0.9-0.25.el3.centos3.s390.rpm
updates/s390/RPMS/seamonkey-devel-1.0.9-0.25.el3.centos3.s390.rpm
2008 Jun 17
2
constrOptim with method = "L-BFGS-B"
Hi,
i need to minimize a quadratic function with boundary condidtions and one
equality condition.
In order to do that i converted the equality constraint into 2 inequality
constaints and passed everything cia constrOptim, as the manual said:
everything included in the ... will be passed to Optim that will pass it
back to fn in case it does not need it.
My code is the following:
mat <-
2011 Nov 08
2
Sorting Panel Data by Time
I have panel data in the following form:
TIME X1 S1
1 1 0.99
1 2 0.50
1 3 0.01
2 3 0.99
2 1 0.99
2 2 0.25
3 3 0.75
3 2 0.50
3 1 0.25
... ... ......
And desire a new vector of observations in which one column (S1 above) is
sorted for each second from least to largest.
That
2008 Jan 11
3
changing the values in a list
useR's,
Does anyone know of an efficient way to change the values in a list to
different numbers stored in an object? For example, consider the following:
y <- matrix(c(20, 13, 25, 10, 17), ncol = 1)
> res
[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[,13] [,14]
[1,] NA NA NA 1.25 0.25 0.75 NA NA NA NA NA NA 1.25
0.25
[2,]
2011 Nov 14
2
How to compute eigenvectors and eigenvalues?
Hello.
Consider the following matrix:
mp <- matrix(c(0,1/4,1/4,3/4,0,1/4,1/4,3/4,1/2),3,3,byrow=T)
> mp
[,1] [,2] [,3]
[1,] 0.00 0.25 0.25
[2,] 0.75 0.00 0.25
[3,] 0.25 0.75 0.50
The eigenvectors of the previous matrix are 1, 0.25 and 0.25 and it is not a diagonalizable matrix.
When you try to find the eigenvalues and eigenvectors with R, R responses:
> eigen(mp)
$values
[1]
2008 Nov 14
0
CentOS-announce Digest, Vol 45, Issue 8
Send CentOS-announce mailing list submissions to
centos-announce at centos.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.centos.org/mailman/listinfo/centos-announce
or, via email, send a message with subject or body 'help' to
centos-announce-request at centos.org
You can reach the person managing the list at
centos-announce-owner at centos.org
When
2010 Feb 05
1
Finding ranges on a per-row basis from several objects
Dear all,
I'm attemping to find the overall range of values from column 5 of a series of data frames, on a per-row basis, and assign the results to a new object. At present, I'm only able to receive the overall range of all values, whereas I'm intending to get the results of the range for each corresponding row. This is what I have so far:
for (i in seq(nrow(dframe[1])))
???
2008 Nov 16
0
CentOS-announce Digest, Vol 45, Issue 10
Send CentOS-announce mailing list submissions to
centos-announce at centos.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.centos.org/mailman/listinfo/centos-announce
or, via email, send a message with subject or body 'help' to
centos-announce-request at centos.org
You can reach the person managing the list at
centos-announce-owner at centos.org
When
2011 Feb 28
1
sub setting data.frame
Hi All,
I have a data.frame:
>pop
consumed ind recruits gonad cell
1 516.74 1 0.02 20.21 0.25
2 1143.20 1 0.02 20.21 0.50
3 250.00 1 0.02 20.21 0.25
4 251.98 1 0.02 18.69 0.25
5 598.08 1 0.02 18.69 0.25
6 437.38 1 0.02 18.69 0.25
7 250.00 1 0.02 17.39 0.25
8 250.00 1 0.02 17.39 0.25
9
2006 Jun 25
1
Puzzled with contour()
Folks,
The contour() function wants x and y to be in increasing order. I have
a situation where I have a grid in x and y, and associated z values,
which looks like this:
x y z
[1,] 0.00 20 1.000
[2,] 0.00 30 1.000
[3,] 0.00 40 1.000
[4,] 0.00 50 1.000
[5,] 0.00 60 1.000
[6,] 0.00 70 1.000
[7,] 0.00 80 0.000
[8,] 0.00 90