Displaying 20 results from an estimated 11000 matches similar to: "How could I find the inverse of a matrix?"
2009 Dec 11
2
How to calculte the power of a matrix
Dear R family
I have a following question.
Suppose I have a matrix as follows, for instance:
tau=
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
1 0 0 0 0
I want to calculate (-m) power of tau, for example, m=893.
When I run tau^2, the outcome is just tau.
Any help would be appreciated.
thanks in advance.
best
moohwan
2009 Dec 13
1
too large dimension problem
Dear R family
When I run the command below, the error message came up. It seems like
the problem is about computer capacity.
It would be appreciated if anyone could give me a solution.
###########
> N <- 415884
> tau <- diag(1, N)[c(N, 1:(N - 1)),]
Error in array(0, c(n, p)) : 'dim' specifies too large an array
Best
Moohwan
2009 Dec 11
3
how to creat a matrix
Dear R family
I am attempting to create a matrix. e.g.,
0 0 0 0 1
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
How could I write a R program?
Later I want to extend it to a N by N case.
Thanks in advance
best
Moohwan
2010 Jul 05
4
To detect the location of duplicate values
Dear R family,
I have a question about how to detect some duplicate numeric observations.
Suppose that I have two variables dataset.
order value
1 0.52
2 0.23
3 0.43
4 0.21
5 0.32
6 0.32
7 0.32
8 0.32
9 0.32
10 0.12
11 0.46
12 0.09
13 0.32
14 0.25
;
Could you help me indicate where the duplicate observations in a row
(e.g., 0.32) are?
best,
moohwan
2009 Dec 18
1
to remove an error with log(zero)
Dear R family
I have an arbitrary column vector.
1
2
4
0
7
5
0
0
0
9
11
12
When I attempt to take natural logarithm of the series, as you guess
there is an error message. To overcome this problem, my idea is to
replace a zero or zeros in a row with appropriate numbers.
In order to implement it, I need to detect where zeros are.
Then I am going to take the average of two adjacent neighbors. In the
2013 May 20
1
How to fit a normal inverse gaussian distribution to my data using optim
Dear R Help
Please forgive my lack of knowledge,.I would be very thankful for some help.
Here is my problem:
I was using optim to estimate parameters of a model and I get this error message
"Error in optim(x0, fn = riskll, method = "L-BFGS-B", lower = lbs, upper = ubs, :
L-BFGS-B needs finite values of 'fn'"
Below is the R code I have written.
2010 Jul 05
2
to remove duplicate values
Dear R family,
Suppose I have two series.
order value
1 0.52
2 0.23
3 0.43
4 0.21
5 0.32
6 0.32
7 0.32
8 0.32
9 0.32
10 0.12
11 0.46
12 0.09
13 0.32
14 0.25
For these two series, I figured out the way to detect the locations of
duplicate values.
The next thing to do is remove the repeated values except for a value
that would not be next to each other.
In other words, while keeping the
2010 Jul 21
1
Question about allocMatrix error message
Dear R family,
I faced a technical problem in r coding.
#s=t(dev)%*%dev/(nr-1) # dev (100,000 by 2) stands for
deviation from the mean
#sinv=solve(s)
#t2=diag(dev%*%sinv%*%t(dev))
I got an error message at t2 statement:
Error in diag(dev %*% si %*% t(dev)) : allocMatrix: too many elements specified
Please let me know if there is a way to overcome this problem.
best
moohwan
2011 Jun 18
1
double integral calculation
a=[0.1,0.2,0.1,0.3,0.4]
b=[0.2,0.3,0.1,0.2,0.5]
c=[1,1,1,1,1]
log(c+a-x*b) where x=unknown scale variable.
int=$$log(c+a-x*b)dadb, where $ denotes integral sign.
Actually, how could I calculate the integral's approximation?
double summation?
best,
moohwan
2010 Jun 04
2
Convolution vector to be derived
I want to generate the following outcome using convolution of two sequences.
x <- c(1,2,3,4,5)
y <- c(6,7,8,9)
The resulting convolution vector is
6
19
40
70
100
94
76
45
When using convolve(), it is hard to produce the result above.
Would you help me out to get that?
Best regards
Moohwan Kim
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
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
Hi,
I am running simulations that does multiple comparisons to control.
For each simulation, I need to model 7 nls functions. I loop over 7 to do
the nls using try
if try fails, I break out of that loop, and go to next simulation.
I get warnings on nls failures, but the simulation continues to run, except
when the internal call (internal to nls) of the chol2inv fails.
2014 Mar 18
1
Developing the UPS side of the UPS-NUT equation (via usbhid)
Things are going along well, but there is one remaining area of confusion...."units". I understand exponents now...it's basically how you pass decimal values. That's easy enough.
But "units"....in other words, I have a voltage I want to put in a report. If I include in the report descriptor the fact that it is actually a voltage, with units of "volts",
2023 Nov 07
1
Concordance and Kendall's tau in copula
Dear
I estimate a sample selection model using the Clayton copula and Burr
and Gaussian marginal. I need to derive ther Kendall'sw tau from the
concordance coefficient by integration. I came across a way to do that
in R long time ago but cannot find it again. Can somewone tell me what
to read and what to use? Thank you.
Steven Yen
2008 Feb 05
1
Got *** caught segfault *** with Quantreg on Mac (PR#10699)
Full_Name: Edward Huang
Version: 2.6.1
OS: Mac OS 10.5.1 Leopard
Submission from: (NULL) (71.198.106.232)
I'm trying to run quantile regression on my data. I just couldn't make it work.
The same dataset ran okay on STATA 10, tho.
Would you please take a look at it?
Here is the error message:
*** caught segfault ***
address 0x3ff00008, cause 'memory not mapped'
Traceback:
2013 Feb 04
2
Contract Syntactic Sugar
## the following is a dream: add some sugar syntax to allow for
contracts with teeth (in and out checking)
> is.positive <- function(x) (all(x>0))
> exponentiate <- function( x ::is.data.frame , exponent ::is.numeric is.positive) :: is.vector is.numeric {
x$base :: is.positive ## error also if base does not exist
in x; may need some special IQ
x$base^exponent
}
2011 Nov 19
1
wald test: compare quantile regression estimators from different samples
Dear all,
I am trying to compare the estimated coefficients of a quantile regression model between two different samples. It is a Wald test, but I cannot find one way to do that in R.The samples are collected conditional on a specific characteristic and I would like to test whether such characteristic indeed affect the estimators. The problem in the test anova.rq is that the response variable
1998 Jul 07
2
S speedup in R
Venables and Ripley describe a speedup where you take a structure like
x<-NULL
for(i in sequence)
y<-c(y,function(x,i))
and convert it to one like
x<-numeric(its length)
for(i in sequence)
y[i]<-function(x,i)
I tried this speedup on some simple examples and it made them twice as
fast.
But now I am hitting a snag with some real code.
This original version works:
2006 Jul 08
1
KhmaladzeTest
Hello. I am a beginer in R and I can not implement the KhmaladzeTest in the following command. Please help me!!!!!!!!!!!
PD: I attach thw results and the messages of the R program
R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.3.1 (2006-06-01)
ISBN 3-900051-07-0
R es un software libre y viene sin GARANTIA ALGUNA.
Usted puede redistribuirlo bajo ciertas
2012 Mar 20
3
Graphic legend with mathematical symbol, numeric variable and character variable
Hi,
I'd like to make a legend with a mix of mathematical symbol (tau),
numeric variable and character variables.I have tried :
types<-c("Type 1","Type 2","Type 2")
tau<-c(1,3,2)
legend(x="topright",legend=paste(types,"tau=",expression(tau)))
but it doesn't work: the 'tau' symbol is not written in its 'symbol