search for: fmat

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

Did you mean: flat
2006 Apr 29
1
SSPIR problem
...nal. > library(sspir) > > # Create observation vector > y_ <- cbind(rep(1, 20), rep(2, 20)) > > mat <- rbind(c(1, 2), c(3, 4)) > > ##################################################################### > # Create model > model <- SS(y = matrix(y_), + Fmat = function(tt, x, phi) { + FM <- mat + cat("Fmat", dim(FM), "\n") + FM + }, + Gmat = function(tt, x, phi) { + GM <- mat + cat("Gmat", dim(GM), "\n") + GM + }...
2011 Apr 19
2
Markov transition matrices , missing transitions for certain years
...ted to write a function (shown below), though I'm not sure if it is needed, I am a bit new the programming world. If I could get some help either with the function or a way around it that would be most appreciated! Thank you! -------------- Function requires the commands already listed above: FMAT <- matrx(0, nrow=4, ncol=4, byrow=TRUE) #This is the matrix that will store the frequency of each possible transition occurring over the 4 years nboxes <- 4 nyears <- 4 for(row in 1:nboxes) { for(col in 1:(nyears-1)) { FMAT[boxes[row,col+1], boxes[row,col]] <- boxes[boxes[row, col+1],...
2010 Aug 24
0
Using kfilter in package sspir - dimensions do not agree
...x.coords <- c(5,6,5,6,8,9,8,8,10,11) y.coords <- c(25,30,42,51,55,52,42,28,24,31) times <- 1:10 x.vel <- c(0,diff(x.coords)/diff(times)) y.vel <- c(0,diff(y.coords)/diff(times)) kal.df <- data.frame(x.coords,x.vel,y.coords,y.vel) kal.ts <- ts(kal.df,deltat=mean(diff(times))) my.Fmat <- function(tt,x,phi){ mf <- matrix(c(1,0,0,0,0,1,0,0),nrow=4,byrow=T) return(mf) } my.Gmat <- function(tt,x,phi){ mat <- matrix(c(1,x[[1]][tt],0,0,0,1,0,0,0,0,1,x[[1]][tt],0,0,0,1),nrow=4,byrow=T) return(mat) } my.Wmat <- function(tt,x,phi){ row.1 <- c((x[[1]][tt]^4)/4,(x[[...
2013 Mar 27
0
Setting up a model in package dlm()
...2(t)). I keep getting an incompatible dimension error despite trying a number of different permutations. I do have a copy of the Petris book, but I haven't had a chance to give it a thorough read at this point. Any assistance would be greatly appreciated: Example code: #n x p output matrix FMat<-cbind(rnorm(123),rnorm(123)) #p x p state transition matrix GMat<-matrix(c(1,0,0,1),ncol=2) #p x p system noise distribution WMat<-matrix(c(0.02,0,0,0.02),ncol=2) # nxn measurement noise Vmat<-matrix(0,ncol=123,nrow=123) diag(Vmat)<-0.02 #initial state mean and variance m0Vec&lt...
2010 Feb 11
0
squid, ntlm_auth, winbind problem
...(2) wbinfo -s S-1-5-21-1063980897-116165429-615769971-1201 SWB+internetbenutzer 2 /var/log/squid&/cache.log: [2010/02/10 14:37:18, 3] libsmb/ntlmssp.c:62(debug_ntlmssp_flags) Got NTLMSSP neg_flags=0xa2088207 [2010/02/10 14:37:18, 3] libsmb/ntlmssp.c:745(ntlmssp_server_auth) Got user=[fmat] domain=[SWB] workstation=[TS1] len1=24 len2=24 [2010/02/10 14:37:18, 0] utils/ntlm_auth.c:271(get_require_membership_sid) Winbindd lookupname failed to resolve 'SWB+Internetbenutzer' into a SID! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Failed lookup a...
2006 Jun 15
1
SSPIR problem
Dear R-Users, I'm using SSPIR package for a spatio-temporal application. Is it possible to modify the structure of the involved matrixes (Fmat, Gmat, Vmat,Wmat)? I want to create a model like this #y(t)=k*theta(t)+epsilon(t) #theta(t)=h*theta(t-1)+eta(t) #epsilon(t) N(0,V) V=sigma2*I #eta(t) N(0,W) W=sigma2_eta where the state variable theta has dimension 1(p=1) and at each time time the observed variable y has dimens...
2000 Dec 29
0
R sings
...volume for tones Here are some example to try: csndPlayMono(11,c(0:12),1,8000,264*2^(c(0:12)/12)) csndPlayStereo(11,c(0:12),1,8000,264*2^(c(0:12)/12),c(-6:6)/6) r<-0.9 x1<-rnorm(10) x2<-rnorm(10) x3<-r*x1+sqrt(1-r^2)*x2 f1<-264+50*x1 f3<-264+50*x3 csndCorrphone(11,f1,f3,1) fmat<-rbind(1/1:20,rep(c(1,0),10)*1/1:20,(1/(1:20))^2*rep(c(1,-1),10)) csndFourierTones(fmat,dur=2) -- Erich Neuwirth, Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-38624 Fax: +43-1-4277-9386 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2003 Sep 17
5
using matrix data for function
Hi All, I have a function, f(x,y) I have a matrix of data, m, with the 1st column is x and the 2nd column is y What's the best way to get f(x,y) for each row of the matrix? I tried result<-f(m[,1],m[,2]) but it doesn't work. Thanks! Bing --------------------------------- 1060 Commerce Park Oak Ridge National Laboratory P.O. Box 2008, MS 6480 Oak Ridge, TN 37831-6480 Phone:
2008 Nov 08
0
geeglm crashes if there are no datapoints in predictor's first level (PR#13266)
Hi, I managed to make R core dump (linux and Mac OSX versions), but I think I've figured out why. First, here's the message I get on core dump (on linux - no message on Mac): R: ../inst/include/tnt/fmat.h:529: TNT::Vector<T> TNT::matmult(const TNT::Fortran_Matrix<T>&, const TNT::Vector<T>&) [with T = double]: Assertion `A.num_cols() == x.dim()' failed. Abort (core dumped) Second, here's the command: mygeeglm<- geeglm(outcome ~ input , data=mydata, id=myda...
2009 May 29
0
possible bug in "sspir" package?
...uency = 1 Series 1 [1,] -0.0498745 [2,] -0.1357787 If I try to trick the code and pass in the transpose of y, I get this error: >y <- t(y) >ssm.fit <- ssm(y ~ tvar(1), family=binomial(link="logit"), fit=FALSE) >ssm.ex1.fit <- extended(ssm.ex1$ss) Error in ss$Fmat(tt, ss$x, ss$phi) : subscript out of bounds When I went in and looked at the details of the ssm code, I saw that on lines 146-151, the code is trying to establish the vectors for the number of trials ("ntotal") and the response ("y") based on the rows of the input matrix y r...
1998 Oct 19
1
dynamically loading C++
Is there a function ".C++(...)" for R, or does anybody know how to dynamically load C++ functions into R? lg at -- Adrian Trapletti, Vienna University of Economics and Business Administration, Augasse 2-6, A-1090 Vienna, Austria Phone: ++43 1 31336 4561, Fax: ++43 1 31336 708, Email: adrian.trapletti at wu-wien.ac.at
2013 Mar 14
2
Modifying a data frame based on a vector that contains column numbers
Hello! # I have a data frame: mydf<-data.frame(c1=rep(NA,5),c2=rep(NA,5),c3=rep(NA,5)) # I have an index whose length is always the same as nrow(mydf): myindex<-c(1,2,3,2,1) # I need c1 to have 1s in rows 1 and 5 (based on the information in myindex) # I need c2 to have 1s in rows 2 and 4 (also based on myindex) # I need c3 to have 1 in row 3 # In other words, I am trying to achieve this