Displaying 8 results from an estimated 8 matches for "drop0".
Did you mean:
drop
2005 Jun 21
0
weighted.residuals for glm objects (PR#7961)
...4 5 6 7
0.3845201 1.4653567 2.1978886 -1.9635372 8.3193602 3.3861695
8 9 10
-4.0899170 -17.5446831 7.8448423
I suggest that the code for `weighted.residuals' is changed to
weighted.residuals <- function (obj, drop0 = TRUE)
{
w <- weights(obj)
r <- residuals(obj, type = "deviance")
if (is.null(w))
r
else if (drop0)
r[w != 0]
else r
}
which seems to do the "right thing" for both `lm' and `glm' objects.
2011 Jan 19
1
buglet in weighted.residuals(mlmObject)
...t;- data.frame(y1=1:4, y2=2^(0:3), wt=log(1:4),
fac=LETTERS[c(1,1,2,2)])
> fit <- lm(data=d4, cbind(y1,y2)~fac, weights=wt)
> weighted.residuals(fit) # expect 3x2 matrix
[1] 1.407294e-16 -5.847465e-01 5.205496e-01 5.950102e-16
-2.338986e+00
[6] 2.082198e+00
> weighted.residuals(fit, drop0=FALSE)
y1 y2
1 0.000000e+00 0.000000e+00
2 1.407294e-16 5.950102e-16
3 -5.847465e-01 -2.338986e+00
4 5.205496e-01 2.082198e+00
This is in R 2.12.0. I haven't upgraded yet.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
2017 Nov 20
2
package check fail on Windows-release only?
...seq, abIseq1, rep2abI, band, bandSparse, bdiag, .bdiag,
c.sparseVector, condest, onenormest, .asmatrix, .dsy2mat, .dsy2dsp,
.dxC2mat, .T2Cmat, ..2dge, .dense2sy, .C2nC, .nC2d, .nC2l, .diag.dsC,
.solve.dgC.chol, .solve.dgC.qr, .solve.dgC.lu, diagN2U, diagU2N,
.diagU2N, .diag2tT, .diag2sT, .diag2mat, drop0, expand, expm, facmul,
fac2sparse, fac2Sparse, forceSymmetric, T2graph, graph2T,
anyDuplicatedT, uniqTsparse, isTriangular, isDiagonal, isLDL,
is.null.DN, invPerm, lu, nearPD, nnzero, formatSpMatrix,
formatSparseM, .formatSparseSimple, printSpMatrix, printSpMatrix2,
qrR, rankMatrix, readHB, readMM,...
2006 Dec 19
1
preserving sparse matrices (Matrix)
Hi,
I have sparse (tridiagonal) matrices, and I use the Matrix package for
handling them. For certain computations, I need to either set the
first row to zero, or double the last row. I find that neither
operation preserves sparsity, eg
> m <- Diagonal(5)
> m
5 x 5 diagonal matrix of class "ddiMatrix"
[,1] [,2] [,3] [,4] [,5]
[1,] 1 . . . .
[2,] . 1
2011 Feb 25
0
R 2.12.2 is released
...affected by what has been done before. (PR#14477)
? The methods of napredict() and naresid() for na.action =
na.exclude fits did not work correctly in the very rare event
that every case had been omitted in the fit. (Reported by Simon
Wood.)
? weighted.residuals(drop0=TRUE) returned a vector when the
residuals were a matrix (e.g. those of class "mlm"). (Reported
by Bill Dunlap.)
? Package HTML index files <pkg>/html/00Index.html were generated
with a stylesheet reference that was not correct for static
browsing in li...
2011 Feb 25
0
R 2.12.2 is released
...affected by what has been done before. (PR#14477)
? The methods of napredict() and naresid() for na.action =
na.exclude fits did not work correctly in the very rare event
that every case had been omitted in the fit. (Reported by Simon
Wood.)
? weighted.residuals(drop0=TRUE) returned a vector when the
residuals were a matrix (e.g. those of class "mlm"). (Reported
by Bill Dunlap.)
? Package HTML index files <pkg>/html/00Index.html were generated
with a stylesheet reference that was not correct for static
browsing in li...
2010 Aug 22
1
spare matrix replacing values efficiently
I am working with a large sparse matrix trying replace all 1 values with 0. The normal method doesn't work. Here is a small example:
> x <- Matrix(0,nrow=10,ncol=10,sparse=TRUE)
> x[,1] <- 1:2
> x
10 x 10 sparse Matrix of class "dgCMatrix"
[1,] 1 . . . . . . . . .
[2,] 2 . . . . . . . . .
[3,] 1 . . . . . . . . .
[4,] 2 . . . . . . . . .
[5,] 1 . . . . . . . . .
2017 Nov 21
0
package check fail on Windows-release only?
...rse, bdiag, .bdiag,
> c.sparseVector, condest, onenormest, .asmatrix, .dsy2mat, .dsy2dsp,
> .dxC2mat, .T2Cmat, ..2dge, .dense2sy, .C2nC, .nC2d, .nC2l, .diag.dsC,
> .solve.dgC.chol, .solve.dgC.qr, .solve.dgC.lu, diagN2U, diagU2N,
> .diagU2N, .diag2tT, .diag2sT, .diag2mat, drop0, expand, expm, facmul,
> fac2sparse, fac2Sparse, forceSymmetric, T2graph, graph2T,
> anyDuplicatedT, uniqTsparse, isTriangular, isDiagonal, isLDL,
> is.null.DN, invPerm, lu, nearPD, nnzero, formatSpMatrix,
> formatSparseM, .formatSparseSimple, printSpMatrix, printSpMatri...