similar to: Multivariate Regression with Weights

Displaying 20 results from an estimated 400 matches similar to: "Multivariate Regression with Weights"

2008 Aug 08
3
Multivariate regression with constraints
Hi all, I am running a bivariate regression with the following: p1=c(184,155,676,67,922,22,76,24,39) p2=c(1845,1483,2287,367,1693,488,435,1782,745) I1=c(1530,1505,2505,204,2285,269,1271,298,2023) I2=c(8238,6247,6150,2748,4361,5549,2657,3533,5415) R1=I1-p1 R2=I2-p2 x1=cbind(p1,R1) y1=cbind(p2,R2) fit1=lm(y1~-1+x1) summary(fit1) Response 2: Coefficients: Estimate Std. Error t value
2008 Jul 30
2
Sampling two exponentials
Hi all, I am going to sample two variables from two exponential distributions, but I want to specify a covariance structure between these two variables. Is there any way to do it in R? Or is there a "Multivariate Exponential" thing corresponding to the multivariate normal? Thanks in advance. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel:
2008 Aug 07
4
Switch two rows in a matrix
Hi all, I have a 4 by 4 matrix, and I want to switch row 2 and row 3 first, then switch column 2 and column 3. Is there an easy way to do it? The following is a tedious way to get what I want. But I wonder if there is a way to simplify this. > a=matrix(rnorm(16),4,4) > a [,1] [,2] [,3] [,4] [1,] 0.33833811 -0.9422273 -0.06181611 -1.8346134 [2,] -0.68167996
2008 Aug 07
1
Covariance matrix
Hi all, Assume I have a random vector with four variables, i.e. A=(a,b,c,d). I am able to get the covariance matrix of vector A, but how can I get the covariance matrix of vector B=(a,c,b,d) by manipulating the corresponding covariance matrix of A? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email:
2008 Jul 25
3
Numerical question
Hi all, I have n independent variables A_1, A_2, A_3,......,A_n, and each with known variances var(A_1), var(A_2),..., but unknown mean. How can I get the approximation of the variance of the product of the variables using numerical computation, i.e. var(A_1*A_2*A_3*.....*A_n)? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176
2008 Jul 23
1
Questions on weighted least squares
Hi all, I met with a problem about the weighted least square regression. 1. I simulated a Normal vector (sim1) with mean 425906 and standard deviation 40000. 2. I simulated a second Normal vector with conditional mean b1*sim1, where b1 is just a number I specified, and variance proportional to sim1. Precisely, the standard deviation is sqrt(sim1)*50. 3. Then I run a WLS regression without the
2008 Aug 12
1
VAR question
Hi all, I got another VAR question here and really appreciate if somebody would help me out :) I have five time series, say A,B,C,D,E. My objective is to predict the series A using the rest, that is, B, C, D and E. A Vector Autoregression Model should work here. But first of all, I should select which series of B, C, D and E to be include in the VAR model, as well as the number of lags. I wonder
2008 Aug 06
1
Matrix multiplication
Hi all, Is there an easy way to do cumulative matrix multipliation in R? What's the syntex? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Sep 05
1
Plot by column
Dear list, I have the following matrix. How can I make the following plot? 1. The x-axis has index 1:7, and the first column is plotted against index 1, second against 2, and so on. 2. I want the points from the left upper conner including the antidiagonal to be plotted with col=2, and the rest with col=3 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.589 0.857 0.923 0.944 0.954 0.963
2011 Sep 22
1
Error in as.vector(data) optim() / fkf()
Dear R users, When running the program below I receive the following error message: fit <- optim(parm, objective, yt = tyield, hessian = TRUE) Error in as.vector(data) : no method for coercing this S4 class to a vector I can't figure out what the problem is exactly. I imagine that it has something to do with "tyield" being a matrix. Any help on explaining what's going on
2011 Nov 12
1
State space model
Hi, I'm trying to estimate the parameters of a state space model of the following form measurement eq: z_t = a + b*y_t + eps_t transition eq y_t+h = (I -exp(-hL))theta + exp(-hL)y_t+ eta_{t+h}. The problem is that the distribution of the innovations of the transition equation depend on the previous value of the state variable. To be exact: y_t|y_{t-1} ~N(mu, Q_t) where Q is a diagonal
2004 Jun 07
2
MCLUST Covariance Parameterization.
Hello all (especially MCLUS users). I'm trying to make use of the MCLUST package by C. Fraley and A. Raftery. My problem is trying to figure out how the (model) identifier (e.g, EII, VII, VVI, etc.) relates to the covariance matrix. The parameterization of the covariance matrix makes use of the method of decomposition in Banfield and Rraftery (1993) and Fraley and Raftery (2002) where
2006 Dec 14
3
Model formula question
Hi all, I'm not familiar with R programming and I'm trying to reproduce a result from a paper. Basically, I have a dataset which I would like to model in terms of successive increments, i.e. (y denote empirical values of y) y_1 = y1, y_2 = y1 + delta1, y_3 = y1 + delta1 + delta2. ... y_m = y1 + sum_2^m delta j where delta_j donote successive increments in the y-values, i.e. delta
2009 Oct 01
1
Help for 3D Plotting Data on 'Irregular' Grid
Dear All, Here is what I am trying to achieve: I would like to plot some data in 3D. Usually, one has a matrix of the kind y_1(x_1) , y_1(x_2).....y_1(x_i) y_2(x_1) , y_2(x_2).....y_2(x_i) ........................................... y_n(x_1) , y_n(x_2)......y_n(x_i) where e.g. y_2(x_1) is the value of y at time 2 at point x_1 (see that the grid in x is the same for the y values at all times).
2010 Jan 26
3
Problem with "nls" function
Dear R users, I have a response variable in a csv file called "y" and a matrix of predictor variables in a csv file called "mat". I have used the function "nls" I have specified the nonlinear relation between these variable.The code I have witten is called Rprog which begins with the phrase: L.minor.m1<-nls(Y~a ....etc.. The program when I execute the program, I
2011 Oct 19
1
Estimating bivariate normal density with constrains
Dear R-Users I would like to estimate a constrained bivariate normal density, the constraint being that the means are of equal magnitude but of opposite signs. So I need to estimate four parameters: mu (meanvector (mu,-mu)) sigma_1 and sigma_2 (two sd deviations) rho (correlation coefficient) I have looked at several packages, including Gaussian mixture models in Mclust, but I am not sure
2014 Feb 08
3
[PATCH 1/2] arm: Use the UAL syntax for ldr<cc>h instructions
On Fri, 7 Feb 2014, Timothy B. Terriberry wrote: > Martin Storsjo wrote: >> This is required in order to build using the built-in assembler >> in clang. > > These patches break the gcc build (with "Error: bad instruction"). Ah, right, sorry about that. > Documentation I've seen is contradictory on which order ({cond}{size} or > {size}{cond}) is correct.
2013 Feb 25
3
Empirical Bayes Estimator for Poisson-Gamma Parameters
Dear Sir/Madam, I apologize for any cross-posting. I got a simple question, which I thought the R list may help me to find an answer. Suppose we have Y_1, Y_2, ., Y_n ~ Poisson (Lambda_i) and Lambda_i ~Gamma(alpha_i, beta_i). Empirical Bayes Estimator for hyper-parameters of the gamma distr, i.e. (alpha_t, beta_t) are needed. y=c(12,5,17,14) n=4 What about a Hierarchal B ayes
2007 Apr 16
1
Greek symbols in xtable rows
Dear R-helpers, I am using xtable package to prepare a Latex code of some R tables. Is this possible to have a greek symbols in xtable cells? How can I get for example a string of : $\Delta$ > "$\Delta$" [1] "$Delta$" And string: > "$\\Delta$" [1] "$\\Delta$" Gives a latex aoutput like: \$$\backslash$Delta\$ Thank You in advance Andris
2005 May 18
1
dse VAR models
Hi, Can anyone tell me how to construct a simple VAR(1) time series with two variables using the dse package? I would like to end up with two time series y_1t = \phi_11 y_1,t-1 + \phi_12 y_2,t-1 + e_1t y_2t = \phi_21 y_1,t-1 + \phi_22 y_2,t-1 + e_2t Best regards, Sam.