similar to: X'W in Matrix

Displaying 20 results from an estimated 700 matches similar to: "X'W in Matrix"

2006 May 03
1
Inverse X'WX matrix from weighted linear regression
Dear list, how can I compute the inverse of the X'WX matrix ("inverse of the weighted sum of squares and crossproducts matrix") from an object of class "lm" from a weigthed linear regression? Thanks, Sven
2007 Oct 30
1
Some matrix and sandwich questions
Dear R-help, I have a four-part question about regression, matrices, and sandwich package. 1) In the sandwich package, I would like to better understand the meat() function. >From the bread() documentation, for a simple OLS regression, bread() returns (1/n * X'X)^(-1) That is, for a simple regression (per the documentation on bread()): MyLM <- lm(y ~ x) bread(MyLM)
2011 Jan 20
1
predict() for bootstrapped model coefficients
I run a multinomial regression on a data set with an outcome that has three values. First, I build an initial model, b.mod. Then I run a loop to bootstrap the coefficients. For the initial model, using "predict()", I can print the wrong/false predictions table. But how do I get this table (that is, the predictions) for the bootstrapped model? Thanks for hints, *S* df <-
2007 Apr 12
1
Question on ridge regression with R
Hi, I am working on a project about hospital efficiency. Due to the high multicolinearlity of the data, I want to fit the model using ridge regression. However, I believe that the data from large hospital(indicated by the number of patients they treat a year) is more accurate than from small hosptials, and I want to put more weight on them. How do I do this with lm.ridge? I know I just need
2004 Mar 25
1
g-inverse question
I am using the ginv function from MASS and have run across this problem that I do not understand. If I define the matrix A as below, its g-inverse does not satisfy the Moore-Penrose condition A %*% ginv(A) %*% A = A. The matrix A is X'WX in a quadratic regression using some very large dollar values. The much simpler matrix B does satisfy the MP condition. Am I doing something wrong? Is
2007 Aug 14
1
cov.unscaled in gls object
Hi list, can I extract the cov.unscaled ("the unscaled covariance matrix") from a gls fit (package nlme), like with summary.lm? Background: In a fixed effect meta analysis regression the standard errors of the coefficients can be computed as sqrt(diag(cov.unscaled)) where cov.unscaled is (X'WX). I try do do this with a gls-fit. Thanks, Sven
2007 Oct 19
2
In a SLR, Why Does the Hat Matrix Depend on the Weights?
I understand that the hat matrix is a function of the predictor variable alone. So, in the following example why do the values on the diagonal of the hat matrix change when I go from an unweighted fit to a weighted fit? Is the function hatvalues giving me something other than what I think it is? library(ISwR) data(thuesen) attach(thuesen) fit <- lm(short.velocity ~ blood.glucose)
2009 Mar 02
2
R-help
Hi list, When I type my question in R console using ? sign (example: ?par, when I want to query for par), the following error message popps up: Error in print.help_files_with_topic("C:/PROGRA~1/R/R-24~1.1/library/maps/chm/map") : CHM file could not be displayed I appreciate if any body comes back to me with the solution. Regards, Alireza [[alternative HTML version deleted]]
2008 Feb 14
4
FW: Memory Problem
I am sure this has been covered before, but I can find it in my archives. I loaded up a new server IBM x3650, 2x Intel dual core cpu's I installed additional RAM to take it up to 7 gigs according to http://www.centos.org/product.html#seven CentOS 5 x86 which I am using supports up to 16gigs of RAM. Once I boot up CentOS only see's about 3.2Gigs of Ram. I installed the kernel-PAE
2015 Mar 19
6
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
This is a Request For Comment, also BCCed to 390 package maintainers of reverse dependencies of the Matrix package. Most users and package authors working with our 'Matrix' package will be using it for numerical computations, and so will be using "dMatrix" (d : double precision) matrix objects M, and indirectly, e.g., for M >= c will also use "lMatrix" (l:
2009 May 13
2
Optimization algorithm to be applied to S4 classes - specifically sparse matrices
Hello. I am trying to optimize a set of parameters using /optim/ in which the actual function to be minimized contains matrix multiplication and is of the form: SUM ((A%*%X - B)^2) where A is a matrix and X and B are vectors, with X as parameter vector. This has worked well so far. Recently, I was given a data set A of size 360440 x 1173, which could not be handled as a normal matrix. I
2006 Jul 19
1
WLS ins systemfit question
How does one specify the weights for WLS in the systemfit command ? That is, there is a weight option in lm(), but there doesn't seem to be weight option for systemfit("WLS") Thanks!
2011 Jul 14
1
WLS regression, lm() with weights as a matrix
Dear All, I've been trying to run a Weighted Least Squares (WLS) regression: Dependent variables: a 60*200 matrix (*Rit*) with 200 companies and 60 dates for each company Independent variables: a 60*4 matrix (*Ft*) with 4 factors and 60 dates for each factor Weights: a 60*200 matrix (*Wit*) with weights for 200 companies and 60 dates for each company The WLS regression I would like to run
2016 Jun 07
2
segfault in IMAP APPEND with compressed maildir
Hi! After upgrading from Debian wheezy with (self compiled) dovecot 2.2.15 to Debian jessie with (self compiled) 2.2.24, I observe the following segmentation fault in the logs: Jun 7 09:23:09 imap dovecot: imap(user at example.com): Error: read(<imap client>) failed: read(size=8003) failed: Connection reset by peer (uid=0, box=trash) Jun 7 09:23:09 imap dovecot: imap(user at
2005 Feb 01
3
polynomials REML and ML in nlme
Hello everyone, I hope this is a fair enough question, but I don’t have access to a copy of Bates and Pinheiro. It is probably quite obvious but the answer might be of general interest. If I fit a fixed effect with an added quadratic term and then do it as an orthogonal polynomial using maximum likelihood I get the expected result- they have the same logLik.
2012 Nov 29
2
Confidence intervals for estimates of all independent variables in WLS regression
I would like to obtain Confidence Intervals for the estimates (unstandardized beta weights) of each predictor in a WLS regression: m1 = lm(x~ x1+x2+x3, weights=W, data=D) SPSS offers that output by default, and I am not able to find a way to do this in R. I read through predict.lm, but I do not find a way to get the CIs for multiple independent variables. Thank you Torvon [[alternative HTML
2009 Jul 20
1
S4 method dispatch with inheritance
Hi, I'm trying to create a new S4 class (myMatrix) which for now just extends dgCMatrix (from package Matrix). Then I want to use "[" which is defined in Matrix. Out of the box with "[" (defined in Matrix) I lose the class information and the result is an object of class dgCMatrix. If I specify a "["-method for myMatrix, it is not used because a signature
2006 Jul 13
1
ols/gls or systemfit (OLS, WLS, SUR) give identical results
I might be sorry for asking this question :-) I have two equations and I tried to estimate them individually with "lm" and "gls", and then in a system (using systemfit) with "OLS", "WLS" and "SUR". Quite surprisingly (for myself at least) the results are identical to the last digit. Could someone (please!) give a hint as to what am I
2012 Dec 11
1
Dispatching on a dgCMatrix does not work.
I represent a graph as an adjacency matrix of class "dgCMatrix" (from the Matrix package). > xx 5 x 5 sparse Matrix of class "dgCMatrix" a b c d e a . 1 1 . . b 1 . 1 . . c 1 1 . 1 1 d . . 1 . 1 e . . 1 1 . To check if the matrix defines and undirected graph, I have made the following functions/methods: is.UG <- function (object) { UseMethod("is.UG") }
2010 Jun 24
1
Question on WLS (gls vs lm)
Hi all, I understand that gls() uses generalized least squares, but I thought that maybe optimum weights from gls might be used as weights in lm (as shown below), but apparently this is not the case. See: library(nlme) f1 <- gls(Petal.Width ~ Species / Petal.Length, data = iris, weights = varIdent(form = ~ 1 | Species)) aa <- attributes(summary(f1)$modelStruct$varStruct)$weights f2 <-