Displaying 20 results from an estimated 10000 matches similar to: "Construction of a large sparse matrix"
2005 Jun 22
1
legend
I color some area grey with polygon() (with a red border) and then I
want to have the dashed red border in the legend as well. How do I
manage it?
And I want to mix (latex) expressions with text in my legend.
Just execute my lines below and you know want I mean. Or pass by at
http://de.wikipedia.org/wiki/Bild:GBM.png to see the picture online.
Thomas
bm <- function(n=500, from=0, to=1) {
More clear statement about the question of how to generate regression matrix with correlation matrix
2003 Jul 12
1
More clear statement about the question of how to generate regression matrix with correlation matrix
Dear R community:
I am trying to do a simulation study mentioned by Fu (1998), Journal of Computational and Graphical Statistics, Volume7, Number 3, Page 397-416. In order to give a clear statement of quesion I copy the following paragraph from the article: We compare the bridge model with the OLS, the lasso and the ridge in a simulation of a linear regression model of 30 observations and 10
2009 Jul 16
1
Error with r2winbugs
Hi,
I am trying to do run the following model saved in "C:/bugs/sus.bug"
model {
for (i in 1:n){
y[i] ~ dpois(lamdba[i])
log(lambda[i]) <- mu+bmale[male[i]]+bschn[schn[i]]+epsilon[i] #
epsilon[i] ~ dnorm(0,tau.epsilon)
}
mu ~ dnorm(0,.0001)
bmale ~ dnorm(0,.0001)
tau.epsilon <- pow(sigma.epsilon, -2)
sigma.epsilon ~ dunif(0,100)
for (j in
2007 May 08
2
statistics/correlation question NOT R question
This is not an R question but if anyone can help me, it's much
appreciated.
Suppose I have a series ( stationary ) y_t and a series x_t ( stationary
)and x_t has variance sigma^2_x and epsilon is normal
(0, sigma^2_epsilon )
and the two series have the relation
y_t = Beta*x_t + epsilon
My question is if there are particular values that sigma^2_x and
sigma^2_epsilon have to take in
2007 Feb 21
1
loops in R help me please
I am trying to make the following Kalman filter equations work and therefore produce their graphs.
v_t=y_t - a_t
a_t+1=a_t+K_t*v_t
F_t=P_t+sigma.squared.epsilon
P_t+1=P_t*(1-K_t)+sigma.squared.eta
K_t=P_t/F_t
Given:
a_1=0,P_1=10^7,sigma.squared.epsilon=15099,
sigma.squared.eta=1469.1
I have attached my code,which of course doesnt work.It produces NAs for the Fs,Ks and the a.
Can somebody tell me
2007 Oct 18
1
R-graphics printing greeks
I have tried to print a table of greek alphabet names and symbols
without success. I can print one character at a time but can't seem to
find a way to automate an entire list of the symbols. Some of the code I
have tried is below. I have searched on help, worked the examples in the
December 2002 R Help Desk article and plotmath but have not been able
to find a way to accomplish the
2009 Jul 22
4
contour plot
Hi,
I want to draw a contour plot of the following function:
z = y*x + epsilon,
where x ~ N(y, 1)
and epsilon ~ N(0, sigma) with sigma fixed (e.g. 1)
But didnt manage to feed "contour" with the right input.
Thanks for your help.
Armin
2012 Apr 26
2
ErrError in f(x, ...) : object 'g.' not found
Hi , R is a new language for me so sorry in advance if this error is to basic
for posting. I have tried the R manual and search online for quite a few, if
anyone could help i would be very thankful.
Here is my code.
kappa = 1.1
theta = 0.1
sigma = 0.4
rho = -0.6
v0 = 0.2
r = 0.05
T = 0.5
s0 = 1
K = 0.5
type = 1
Hestoncall = function(kappa,theta,sigma,rho,v0,r,T,s0,K,type)
{
u = 0.5
b
2014 Jul 09
2
[LLVMdev] How to resolve decoding conflict?
Hi all,
Short version
I get decoding conflicts during generation of disassembler tables for
my modified PowerPC backend:
001100..........................
................................
ADDIC 001100__________________________
E_LBZ 001100__________________________
Which methods can be used to resolve this kind of error?
Long version:
I'm trying to implement support for the PowerPC
2006 May 24
1
(PR#8877) predict.lm does not have a weights argument for
I am more than 'a little disappointed' that you expect a detailed
explanation of the problems with your 'bug' report, especially as you did
not provide any explanation yourself as to your reasoning (nor did you
provide any credentials nor references).
Note that
1) Your report did not make clear that this was only relevant to
prediction intervals, which are not commonly used.
2007 Jan 06
1
help with gls
Hello R-users,
I am using gls function in R to fit a model with certain correlation
structure.
The medol as:
fit.a<-gls(y~1,data=test.data,correlation=corAR1(form=~1|aa),method="ML")
mu<-summary(fit.a)$coefficient
With the toy data I made to test, the estimate of mu is exactly equal to
the overall mean of y which can not be true.
But, if I make a toy data with y more than two
2012 Mar 29
1
Error, Variable is Missing
Hi, I am writing a function to plot a pdf of a distribution,
GNL.pdf.fn = function(x,mu,sigma,alpha,beta,rho)
{
y = x-rho*mu
cf.fn = function(s){
cplex = complex(1,0,1)
temp1 = alpha*beta*exp(-sigma*s^2/2)
temp2 = (alpha-cplex*s)*(beta+cplex*s)
out = (temp1/temp2)^rho
out
}
temp.fn = function(s){
(Mod(cf.fn(s)))*cos(Arg(cf.fn(s))-s*y)
}
int.fn =
2008 Jul 23
1
R2WinBUGS problem
Dear friends - I'm on winXP, R 2.71 - I have with some help dveloped
this multivariate normal model, which gives very plausible results in
WinBUGS even without any
initial values specified. However, when I then try to run the same model
via the bugs function in R2WinBUGS with inits specified as inits=NULL
the program stops in a dead end. So I have tried to make inits for the
bugs function
2012 Feb 18
3
R help
Dear all,
I need to generate numbers from multivariate normal with large dimensions
(5,000,000).
Below is my code and the error I got from R. Sigma in the code is the
covariance
matrix. Can anyone give some idea on how to take care of this error. Thank
you.
Hannah
> m <- 5000000
> m1 <- 0.5*m
> rho <- 0.5
> Sigma <- rho* matrix(1, m, m)+diag(1-rho, m)
2018 Apr 12
3
Bivariate Normal Distribution Plots
R-Help
I am attempting to create a series of bivariate normal distributions. So using the mvtnorm library I have created the following code ...
# Standard deviations and correlation
sig_x <- 1
sig_y <- 1
rho_xy <- 0.0
# Covariance between X and Y
sig_xy <- rho_xy * sig_x *sig_y
# Covariance matrix
Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
2020 Nov 10
1
Fwd: Select output section for a function based on a subtarget feature
Hello,
I'm implementing a port of LLVM for PowerPC VLE. It's a compressed
instruction set similar to mips16 and ARM Thumb. Instruction
encoding (VLE/non-vle) is selected for a given memory region by an
attribute in a memory area descriptor. Targets supporting this that
I know of are all bare-metal (so powerpc-none-elf).
I'm trying to implement ELF support right now. VLE ELF files
2010 Jun 23
2
question about a program
Dear all,
I have the following program for a multiple comparison procedure.
There are two functions for the two steps. First step is to calculate the
critical values,
while the second step is the actual procedure [see below: program with two
functions].
This work fine. However, However I want to put them into one function
for the convenience
of later use [see below: program with one
2007 May 11
1
Create an AR(1) covariance matrix
Hi All.
I need to create a first-order autoregressive covariance matrix
(AR(1)) for a longitudinal mixed-model simulation. I can do this
using nested "for" loops but I'm trying to improve my R coding
proficiency and am curious how it might be done in a more elegant
manner.
To be clear, if there are 5 time points then the AR(1) matrix is 5x5
where the diagonal is a constant
2006 Aug 11
1
garch results is different other soft
Hi
I compared garch results in R with those give by other software and found
that their coefficients are different from each other. So I wondered that a
convention the garch funcion in R takes.
By testing the output, I noticed it seems that garch function in R by
default takes such a convention:
y(t) = c + sigma(t) where c=0 and sigma(t) = a(0) + a(1)*epsilon^2 +
b(1)*sigma(t-1)^2.
I also checked
2007 Jan 19
3
integrate and quadratic forms
Hi all.
I'm trying to numerically invert the characteristic function
of a quadratic form following Imhof's (1961, Biometrika 48)
procedure.
The parameters are:
lambda=c(.6,.3,.1)
h=c(2,2,2)
sigma=c(0,0,0)
q=3
I've implemented Imhof's procedure two ways that, for me,
should give the same answer:
#more legible
integral1 = function(u) {