Displaying 20 results from an estimated 1700 matches similar to: "traverse through many columns of a matrix in a function"
2007 Jan 21
1
for loop problem
Hello R users,
A beginners question which I could not find the answer to in earler posts.
My thought process:
Here "z" is a 119 x 15 data matrix
Step 1: start at column one, bind every column with column 1
Step2: use the new matrix, "test", in the fitCopula package
Step3: store each result in myfit, bind each result to "answer"
Step4: return "answer"
2007 Jan 18
0
fitCopula method in R
--
Hello,
I am attempting to fit monthly stock returns to possible copula functions using
the copula package in R. Below is my code (mat2 is a 2x119 matrix of the two
stock returns):
my.cop <- normalCopula(param=.3, dim = 2, dispstr = "un")
myfit <- fitCopula(mat2,my.cop, start=.65, optim.control= list(NULL), method =
"BFGS")
myfit
Unfortunately, I continue to receive
2018 Apr 21
0
Error : 'start' contains NA values when fitting frank copula
>>>>> Soumen Banerjee <soumen08 at gmail.com>
>>>>> on Sat, 21 Apr 2018 17:22:56 +0800 writes:
> Hello! I am trying to fit a copula to some data in R and
> I get the error mentioned above. This is the code for a
> reproducible example -
(not really reproducible: You did not set the random seed, so
the data is different every time;
2009 Apr 22
1
Copula package
Hi R-users,
I would like to use the copula package.? I? the package plus the mvtnorm and try to run the example given, but I got the following message:
install.packages(repos=NULL,pkgs="c:\\Tinn-R\\copula_0.8-3.zip")
norm.cop <- normalCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = "un")
t.cop <- tCopula(c(0.5, 0.3), dim = 3, dispstr = "toep",
df = 2, df.fixed =
2007 Mar 01
1
Fit Student Copula
Hello everybody,
I have a big problem that I do not manage to solve !
I will be very grateful if you can solve this !
I want to fit a t Copula with the copula package :
> student.cop <- ellipCopula("t", param = c(0.5, 0.6, 0.7), dim = 3, dispstr = "un",df=5)
> x<-rcopula(student.cop,1000)
> fit <- fitCopula(x, student.cop, c(0.5,0.5,0.5,5))
And there is an
2006 Oct 13
1
Copula in R 2.4.0
Dear R helper,
does anyone have an idea on why R.2.4.0 draws the surface for the two
command lines below and the next time it renders the error message below
for exactly the same command lines:
> norm.cop <- normalCopula(0.5)
> persp(norm.cop, dcopula)
Error in ceiling(length.out) : Non-numeric argument to mathematical
function.
I will appreciate any help from anyone
thanks,
Dominique
2008 Jan 05
3
is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)
is() does not catch parent S3 classes:
> library(splines)
> temp <- bs(1:99, df=5)
> class(temp)
[1] "bs" "basis"
> is(temp, "basis")
[1] FALSE
In contrast, is() does catch parent S4 classes:
> library(copula)
> norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7),
+ dim = 3, dispstr = "un")
2018 Apr 21
2
Error : 'start' contains NA values when fitting frank copula
Hello!
I am trying to fit a copula to some data in R and I get the error mentioned
above. This is the code for a reproducible example -
library(copula)
data = matrix(data=runif(600),nrow=200,ncol=3)
data[,2] = 2*data[,1]
data[,3] = 3*data[,1]
fr_cop = frankCopula(dim=3)
fit_fr_cop = fitCopula(fr_cop,pobs(data),method = "mpl") #Error Here
The error says : Error in fitCopula.ml(copula, u
2006 Oct 10
2
copula
Dear R-helper,
Is there any thing that I am doing wrong in the following codes:
> norm.cop <- normalCopula(0.5)
> persp(norm.cop, dcopula)
The last command produces what follows
Error in persp(x, y, z, xlim, ylim, zlim, theta, phi, r, d, scale,
expand, :
invalid 'x' argument
In addition: Warning messages:
1: no non-missing arguments to min; returning Inf
2: no
2010 Jun 10
0
error message fitting tcopula
Hi r-users,
I really need help in fitting the t-copula. I try to reproduce the example given by Jun Yan in “Enjoy the joy of copula” but I’m not sure how to correct the error based on the error message. I tried so many ways but still could not get it working.
loglik.marg <- function(b, x) sum(dgamma(x, shape = b[1], scale = b[2], log = TRUE))
ctrl <- list(fnscale = -1)
#dat <-
2010 Jun 10
0
error message in fitting tcopula
Hi r-users,
I really need help in fitting the t-copula. I try to reproduce the
example given by Jun Yan in "Enjoy the joy of copula" but I'm not sure
how to correct the error based on the error message. I tried so many
ways but still could not get it working.
loglik.marg <- function(b, x) sum(dgamma(x, shape = b[1], scale = b[2],
log = TRUE))
ctrl <- list(fnscale
2009 Jan 13
1
Converting Factor to Vector
Hi all,
How can I convert factor like this:
> str(repo)
'data.frame': 1000 obs. of 1 variable:
$ AAA: Factor w/ 1000 levels "AAT","AAC",..: 1 2 3 4 5 6 7 8 9 10 ...
> print(repo)
AAA
1 AAA
2 AAT
3 AAC
...
into to simple vector
> str(new_repo)
chr [1:100] "AAA" "AAT" "AAC" "AAG" "ATA" "ATT"...
2002 Nov 21
0
Re: RArcInfo question(basic=T, newbie=T, annoying=T)
Dear Steve,
I'll post your question also to the R-help mailing list since I think
this can help to other RArcInfo users.
As I mentioned in the last release of the package, I have a tutorial
nearly finished. I hope to release it in the next days.
> I have downloaded an .e00 file of 2000 Census Tracts for the southern US
> State of Georgia, and I'm wondering which steps I need to go
2013 Mar 17
1
Copula package - normalCopula() param order
Hey all,
I'm trying to construct a 7-dimensional normal copula using the copula package. I'd like to supply as parameter a randomly generated correlation matrix (that I'll convert to a vector so I can feed it to the normalCopula function). What order do the pairwise correlations inside that vector have to be in? In other words: What does the normalCopula function "expect"?
2006 Apr 24
3
the 'copula' package
Is anybody using the Copula package in R? The particular problem I'm
facing is that R is not acknowledging the fitCopula command/function
when I load the package and (try to) run something very simple:
fit1 <- fitCopula(x1 = list(u11,u12,u13,u14,u15,u16,u17,u18), tCopula,
optim.control = list(NULL), method = "BFGS")
Anybody also using it, successfully or unsuccessfully?
2006 Dec 21
0
[792] trunk/wxruby2/swig/classes/include/wxDisplay.h: Added missing class, but a wrapper needs some tweaking
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2007 Jun 22
2
fitCopula
I am using R 2.5.0 on windows XP and trying to fit copula. I see the
following code works for some users, however my code crashes on the
chol. Any suggestions?
> mycop <- tCopula(param=0.5, dim=8, dispstr="ex", df=5)
> x <- rcopula(mycop, 1000)
> myfit <- fitCopula(x, mycop, c(0.6, 10), optim.control=list(trace=1),
method="Nelder-Mead")
2009 May 15
1
help on Nan error
Hi guys
My data is Tasmania txt
There are *N *= 16 samples, consisting of 8 replicate cores (taken from
different areas across the sandflat) from each of 2 natural
'treatments' (either
disturbed "D" or undisturbed "U" by soldier crab burrowing activity. The
abundances of each of *p *= 56 species were recorded from each core
(variables 1 to 39 in the file are
2008 Mar 26
1
adjusted means and adjusted standard errors after ANOVA
I am trying to obtain adjusted means and standard errors for a three way
ANOVA
I have three effects, two continuous; fire frequency and annual
precipitation, and one categorical; soil type in an unbalanced design.
I am testing the effect of annual precipition (AP), soil type (ST), and fire
frequency (FF) on stem count (SCt)
My data table looks as such:
ST
FF
AP
SCt
3
Coy
2009 Jan 13
3
Returning Non-Unique Index with Which (alternatives?)
Dear all,
I tried to find index in repo given a query with this:
> repo <- c("AAA", "AAT", "AAC", "AAG", "ATA", "ATT")
> qr <- c("AAC", "ATT", "ATT")
> which(repo%in%qr)
[1] 3 6
Note that the query contain repeating elements, yet
the output of which only returns unique.
How can I make it