Displaying 11 results from an estimated 11 matches for "sigma_1".
Did you mean:
sigma_j
2010 Aug 02
2
Dealing with a lot of parameters in a function
...ihood function to work with MLE.
There will be parameters like mu_i, sigma_i, tau_i, ro_i, for i between
1 to 24. Instead of listing all the parameters, one by one in the
function definition, is there a neat way to do it in R ? The example is
as follows:
ll<- function(mu1=-0.5,b=1.2,tau_1=0.5,sigma_1=0.5,ro_1=0.7)
{ if (tau1>0 && ro<1 && ro>-1)
-sum(dmnorm(cbind(x,y),c(mu1,b*mu1),matrix(c(tau_1^2,ro_1*tau_1*sigma_1,
ro_1*tau_1*sigma_1,sigma_1^2),nrow=2),log=T))
else NA
}
but now I need to have the sum of 24 of these negative log-likelihood.
Thanks.
Yue
Notice:...
2011 Sep 22
1
Error in as.vector(data) optim() / fkf()
...ne that it has
something 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...
2011 Nov 12
1
State space model
...x(abs(rnorm(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_...
2004 Jun 07
2
MCLUST Covariance Parameterization.
...the within 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 t...
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...
2006 Sep 01
0
defining error structure in bivariate mixed models
...variables are
one.var :- the two response 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...
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
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...
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...
2013 Apr 07
0
Fitting distributions to financial data using volatility model to estimate VaR
...be as detailed 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 t...