search for: sigma_2

Displaying 12 results from an estimated 12 matches for "sigma_2".

Did you mean: sigma2
2011 Sep 22
1
Error in as.vector(data) optim() / fkf()
...mething to do with "tyield" being a matrix. Any help on explaining what's going on and how to solve this is much appreciated. Thank you, Kristian library(FKF) #loading Fast Kalman Filter package library(Matrix) # matrix exponential package K_1 = 0.1156 K_2 = 0.17 sigma_1 = 0.1896 sigma_2 = 0.2156 lambda_1 = 0 lambda_2 = -0.5316 theta_1 = 0.1513 theta_2 = 0.2055 #test data tyield <- matrix(data = rnorm(200), nrow =2, ncol =100) # defining dimensions m <- 2 # m is the number of state variables n <- 100 # is the length of the observed sample d <- 2 # is the number of obs...
2011 Nov 12
1
State space model
...rm(400)), nrow=10, ncol=40) m <- 2 # m is the number of state variables n <- ncol(x) # is the length of the observed sample d <- nrow(x) # is the number of observed variables. h <- 1/52 ## creating state space representation of 2-factor CIR model CIR2ss <- function(K_1, K_2, sigma_1, sigma_2, lambda_1, lambda_2, theta_1, theta_2, delta_0, delta_1, delta_2) { ## defining auxilary parameters, phi_11 <- sqrt((K_1+lambda_1)^2+2*sigma_1^2*delta_1) phi_21 <- sqrt((K_2+lambda_2)^2+2*sigma_2^2*delta_2) phi_12 <- K_1+lambda_1+phi_11 phi_22 <- K_2+lambda_...
2004 Jun 07
2
MCLUST Covariance Parameterization.
...hin class covariance matrix) So, just what do the distribution, volume, shape, and orientation mean in the context of Sigma_k? What do the distribution, volume, shape, and orientation mean for a Sigma_k=sigma^2*I where I is a p by p covariance matrix, sigma^2 is the constant variance and Sigma_1=Sigma_2=…=Sigma_G. What about when a Sigma_k=sigma^2_k*I, or when Sigma_1=Sigma_2=…=Sigma_G in situations where each element of the (constant across class) covariance matrix is different? I would say I have a pretty good understanding of finite mixture modeling, but nothing I've read (expect the works...
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 what is the best way, or the best package to use for this task. Greatly appreciate any suggestions! Serguei Kaniovski ______________________________...
2008 Aug 04
2
Multivariate Regression with Weights
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)?? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreame...
2006 Sep 01
0
defining error structure in bivariate mixed models
...se variables stacked one after another indic1 :- Indicator for variable one indic2 :- indicator for variable two d.time :- A covariate m.unit :- the grouping units. However I want to do this with the error structure for the grouping unit as follows sigma = ( sigma_1 0 ) ( 0 sigma_2) where sigma_1 = sig1 * AR1(rho1) = error relating to variable 1 sigma_2 = sig2* AR1(rho2) = error relating to variable 2 How can I do this using lme()? Any help is greatly appreciated. Regards Souvik Banerjee Junior Research Fellow Dept of Statistics University of calcutta [[alternative H...
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
2007 Nov 06
0
Discrepancy of Neg. Binomial Estimation in R
...************************************************************************* # Data Generation obs=500 beta = c(0,1) # Generate the independent variable z= runif(obs) # Generate X matrix x = cbind(rep(1,obs),z) # Generate the dependent variable from a neg. binomial distribution phi = exp(x%*%beta) sigma_2 = 10 y = rnbinom(obs,size=phi/(sigma_2-1),mu=phi) # Neg. Binomial log-likelihood function like.nb=function(par,x,y) { phi_e=exp(x%*%par[1:2]) sig2_e=exp(par[3])+1 sum(lgamma(phi_e/(sig2_e-1)+y)-lgamma(phi_e/(sig2_e-1))+y*log((sig2_e-1)/sig2_e)-(phi_e/( sig2_e-1))*log(sig2_e)) } # Ng. Binomi...
2005 Nov 16
6
nlme question
I am using the package nlme to fit a simple random effects (variance components model) with 3 parameters: overall mean (fixed effect), between subject variance (random) and within subject variance (random). I have 16 subjects with 1-4 obs per subject. I need a 3x3 variance-covariance matrix that includes all 3 parameters in order to compute the variance of a specific linear
2001 Oct 04
0
Summary on random data with zero skew and some kurtosis
Thanks to all who response my problem. Here are my summary : 1. from Dirk Eddelbuettel <edd at debian.org> We could try a mixture of normals -- ie flip a coin (use a uniform with some cutoff c where 0 < c < 1 ) to choose between N(0, sigma_1) and N(0, sigma_2). 2. from Michaell Taylor <michaell.taylor at reis.com> We could use the gld library to specify the lambdas of virtually any distribution, including the one that you are interested in. It is available from CRAN. Calculating the lambda's from known moments is a bit tricker, bu...
2001 Oct 03
0
Summary : Generate random data from dist. with 0 skewness and some kurtosis
Thanks to all who response my problem. Here are my summary : 1. from Dirk Eddelbuettel <edd at debian.org> We could try a mixture of normals -- ie flip a coin (use a uniform with some cutoff c where 0 < c < 1 ) to choose between N(0, sigma_1) and N(0, sigma_2). 2. from Michaell Taylor <michaell.taylor at reis.com> We could use the gld library to specify the lambdas of virtually any distribution, including the one that you are interested in. It is available from CRAN. Calculating the lambda's from known moments is a bit tricker, bu...
2013 Apr 07
0
Fitting distributions to financial data using volatility model to estimate VaR
...tailed as possible. I want to fit a distribution to my financial data using a volatility model to estimate the VaR. So in case of a normal distribution, this would be very easy, I assume the returns to follow a normal distribution and calculate a volatility forecast for each day, so I have sigma_1,sigma_2,...,sigma_n,. I can calculate the VaR via (mu constant, z_alpha quantile of standard normal): VaR_(alpha,t)=mu+sigma_t * z_alpha. This is in case, I have losses, so I look at the right tail. So for each day I have a normal density with a constant mu but a different sigma corrensponding to the volat...