similar to: Weight matrix in linear regression

Displaying 20 results from an estimated 8000 matches similar to: "Weight matrix in linear regression"

2012 Aug 11
3
Problem when creating matrix of values based on covariance matrix
Hi, I want to simulate a data set with similar covariance structure as my observed data, and have calculated a covariance matrix (dimensions 8368*8368). So far I've tried two approaches to simulating data: rmvnorm from the mvtnorm package, and by using the Cholesky decomposition (http://www.cerebralmastication.com/2010/09/cholesk-post-on-correlated-random-normal-generation/). The problem is
2010 Apr 13
1
Lapack, determinant, multivariate normal density, solution to linear system, C language
r-devel list, I have recently written an R package that solves a linear least squares problem, and computes the multivariate normal density function. The bulk of the code is written in C, with interfacing code to the BLAS and Lapack libraries. The motivation here is speed. I ran into a problem computing the determinant of a symmetric matrix in packed storage. Apparently, there are no explicit
2010 Jan 21
3
Anova unequal variance
I found this paper on ANOVA on unequal error variance. Has this be incorporated to any R package? Is there any textbook that discuss the problem of ANOVA on unequal error variance in general? http://www.jstor.org/stable/2532947?cookieSet=1
2004 Dec 12
2
Help : generating correlation matrix with a particular structure
Hi, I would like to generate a correlation matrix with a particular structure. For example, a 3n x 3n matrix : A_(nxn) aI_(nxn) bI_(nxn) aI_(nxn) A_(nxn) cI_(nxn) aI_(nxn) cI_(nxn) A_(nxn) where - A_(nxn) is a *specified* symmetric, positive definite nxn matrix. - I_(nxn) is an identity matrix of order n - a, b, c are (any) real numbers Many attempts have been unsuccessful because a
2006 Mar 15
1
Log Cholesky parametrization in lme
Dear R-Users I used the nlme library to fit a linear mixed model (lme). The random effect standard errors and correlation reported are based on a Log-Cholesky parametrization. Can anyone tell me how to get the Covariance matrix of the random effects, given the above mentioned parameters based on the Log-Cholesky parametrization?? Thanks in advance Pryseley
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
2012 Oct 12
2
party for prediction [REPOST]
Apologies for re-posting, my original message seems to have been overlooked by the moderators. ---------- Forwarded message ---------- From: Ed <icelus2k5 at gmail.com> Date: 11 October 2012 19:03 Subject: party for prediction To: R-help at r-project.org Hi there I'm experiencing some problems using the party package (specifically mob) for prediction. I have a real scalar y I want to
2003 May 20
3
a quick Q about memory limit in R
Hello, there, I got this error when i tried to run " data.kr <- surf.gls(2, expcov, data, d=0.7);" "Error: cannot allocate vector of size 382890 Kb Execution halted" My data is 100x100 grid. the following is the summary of "data": > summary(data); x y z Min. : 1.00 Min. : 1.00 Min. :-1.0172 1st Qu.: 26.00
2003 May 22
1
(no subject)
Dear R-helpers! What it's means "Rank failure in Choleski decomposition" by using of function surf.gls {spatial}? Sincerely Yours Branimir K. Hackenberger
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users I am relatively new to R, i hope my many novice questions are welcome. I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme. I used the following models: yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
2009 Apr 01
2
Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition
Dear fellow R Users: I am doing a Cholesky decomposition on a correlation matrix and get error message the matrix is not semi-definite. Does anyone know: 1- a work around to this issue? 2- Is there any approach to try and figure out what vector might be co-linear with another in thr Matrix? 3- any way to perturb the data to work around this? Thanks for any suggestions.
2009 Mar 10
5
Cholesky Decomposition in R
Hi everyone: I try to use r to do the Cholesky Decomposition,which is A=LDL',so far I only found how to decomposite A in to LL' by using chol(A),the function Cholesky(A) doesnt work,any one know other command to decomposte A in to LDL' My r code is: library(Matrix) A=matrix(c(1,1,1,1,5,5,1,5,14),nrow=3) > chol(A) [,1] [,2] [,3] [1,] 1 1 1 [2,] 0 2 2
2003 Mar 31
1
nonpos. def. var-cov matrix
R 1.6.2 for Windows, Win2k: I have fitted a weighted least squares model using the code "wls.out <- gls(y ~ x1 + x2 + x3 + x4 + x5 + x6 - 1, data = foo.frame, weights = varConstPower(form = ~ fitted(.), fixed = list(power = 0.5), const = 1))" The data has 62 rows and the response is zero when the covariates are zero. The purpose of the model was to account for the the fact that
2005 Jan 21
1
Cholesky Decomposition
Can we do Cholesky Decompositon in R for any matrix --------------------------------- [[alternative HTML version deleted]]
2002 Dec 17
1
lme invocation
Hi Folks, I'm trying to understand the model specification formalities for 'lme', and the documentation is leaving me a bit confused. Specifically, using the example dataset 'Orthodont' in the 'nlme' package, first I use the invocation given in the example shown by "?lme": > fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age Despite the
2007 Jul 24
1
function optimization: reducing the computing time
Dear useRs, I have written a function that implements a Bayesian method to compare a patient's score on two tasks with that of a small control group, as described in Crawford, J. and Garthwaite, P. (2007). Comparison of a single case to a control or normative sample in neuropsychology: Development of a bayesian approach. Cognitive Neuropsychology, 24(4):343?372. The function (see
2012 Dec 05
1
Understanding svd usage and its necessity in generalized inverse calculation
Dear R-devel: I could use some advice about matrix calculations and steps that might make for faster computation of generalized inverses. It appears in some projects there is a bottleneck at the use of svd in calculation of generalized inverses. Here's some Rprof output I need to understand. > summaryRprof("Amelia.out") $by.self self.time self.pct
2003 Jun 13
5
covariate data errors
Greetings, I would like to fit a multiple linear regression model in which the residuals are expected to follow a multivariate normal distribution, using weighted least squares. I know that the data in question have biases that would result in correlated residuals, and I have a means for quantifying those biases as a covariance matrix. I cannot, unfortunately, correct the data for these biases.
2005 Jan 18
1
lme confusion
Hi, this is my first time using the nlme package, and I ran into the following puzzling problem. I estimated a mixed effects model using lme, once using groupedData, once explicitly stating the equations. I had the following outputs. All the coefficients were similar, but they're always slightly different, making me think that it's not due to numerical error. Also, what is the
2013 Jun 23
1
2SLS / TSLS / SEM non-linear
Dear all, I try to conduct a SEM / two stage least squares regression with the following equations: First: X ~ IV1 + IV2 * Y Second: Y ~ a + b X therein, IV1 and IV2 are the two instruments I would like to use. the structure I would like to maintain as the model is derived from economic theory. My problem here is that I have trouble solving the equations to get the reduced form so I can run