search for: lam2

Displaying 13 results from an estimated 13 matches for "lam2".

Did you mean: lam
2006 Oct 03
1
do.call with Vectorial Argument
...need to express then this way to be able later on to integrate them numerically with the adapt package). Consider the small script: remove(list=ls()) #library(adapt) # first a list of the parameters tau<-0.1 beta<-1/tau St<-tau D=2e-2 q<-2*beta^2*D lam1<- -beta/2*(1+sqrt(1-4*St)) lam2<- -beta/2*(1-sqrt(1-4*St)) x0<- 0 vx0<- 1 # fist a function with scalar parameters sigma_pos_old<-function(t,q,lam1,lam2) { q/(lam1-lam2)^2*( (exp(2*lam1*t)-1)/(2*lam1)-2/(lam1+lam2)*(exp(lam1*t+lam2*t)-1) + (exp(2*lam2*t)-1)/(2*lam2) ) } # now the same function where the only argume...
2006 Sep 22
4
Creating Movies with R
...r. I wonder if it is possible to use the data generated for different times to create something like an .avi file. Here is the script: rm(list=ls()) library(lattice) # I start defining the analytical functions needed to get the density as a function of time expect_position <- function(t,lam1,lam2,pos_ini,vel_ini) {1/(lam1-lam2)*(lam1*exp(lam2*t)-lam2*exp(lam1*t))*pos_ini+ 1/(lam1-lam2)*(exp(lam1*t)-exp(lam2*t))*vel_ini } sigma_pos<-function(t,q,lam1,lam2) { q/(lam1-lam2)^2*( (exp(2*lam1*t)-1)/(2*lam1)-2/(lam1+lam2)*(exp(lam1*t+lam2*t)-1) + (exp(2*lam2*t)-1)/(2*lam2) ) } rho_x<-funct...
2007 Apr 27
1
error returned by "make check" in R-2.5.0
...74 -1.6299494 -2.5074489 > > stopifnot( + abs(sm %*% V - V %*% diag(lam)) < 60*Meps, + abs(sm - V %*% diag(lam) %*% t(V)) < 60*Meps) > > ##------- Symmetric = FALSE: -- different to above : --- > > em <- eigen(sm, symmetric = FALSE); V2 <- em$vect > print(lam2 <- em$values) # ordered decreasingly in ABSolute value ! [1] 5.1738946 3.1585064 -2.5074489 -1.6299494 0.6849974 > print(i <- rev(order(lam2))) [1] 1 2 5 4 3 > stopifnot(abs(lam - lam2[i]) < 60 * Meps) Error: abs(lam - lam2[i]) < 60 * Meps is not all TRUE Execution halted Int...
2009 Nov 09
0
unexpected results involving the skellam distribution
...ed random variable with respect to the skellam distribution. I would expect to get random errors, but the plot sistematically shows a non-random pattern (first a peak and then a low). I don't know how to explain this. Can somebody enlighten me?? require(skellam) n <- 5000 lam1 <- 5.45 lam2 <- 2.78 p1 <- rpois(n, lam1) p2 <- rpois(n, lam2) rho <- cor(p1,p2) z <- hist(p1-p2, plot=FALSE) mu1 <- lam1 - (rho*sqrt(lam1*lam2)) mu2 <- lam2 - (rho*sqrt(lam1*lam2)) x <- z$breaks[1:length(z$breaks)-1] y <- dskellam(x, mu1, mu2) plot(x,z$density-y) -- Cheers. E...
2013 Mar 18
1
"save scores" from sem
...manifest variable vector with the estimates for the specific effect. To make an example: v1; v2; v3; v4 are manifest variables that loads on one y latent variablein a data frame called "A" the code for the model should be like: model <-specifymodel( y -> v1, lam1, NA y -> v2, lam2, NA y -> v3, lam3, NA y -> v4, lam4, NA After fitting the model with sem model.sem <- sem(model, data=A) you should be able to compute the y variable like: attach(data) data$y<-v1*lam1+v2*lam2+v3*lam3+v4*lam4 #change the loading name with the actual loading (number) or extract them...
2007 Jun 27
1
SEM model fit
....88 RMSEA index = 0.0711 90% CI: (NA, NA) Bentler-Bonnett NFI = 0.888 Tucker-Lewis NNFI = 0.888 Bentler CFI = 0.902 SRMR = 0.0682 BIC = 51.4 SYNTAX rm(sem.enf.rq) mdl.rq <- specify.model() enf -> law2, NA, 1 enf -> law3, lam2, 1 enf -> law4, lam3, 1 enf <-> enf, psi1, 0.6 law2 <-> law2, theta1, 0.3 law3 <-> law3, theta2, 0.3 law4 <-> law4, theta3, 0.5 gender...
2006 Aug 22
1
Total (un)standardized effects in SEM?
Hi there, as a student sociology, I'm starting to learn about SEM. The course I follow is based on LISREL, but I want to use the SEM-package on R parallel to it. Using LISREL, I found it to be very usable to be able to see the total direct and total indirect effects (standardized and unstandardized) in the output. Can I create these effects using R? I know how to calculate them
2012 Mar 04
1
Could not compute QR decomposition of Hessian.
...### mDPDF = data.frame(mj1,mj2,mj3,mj4,mj5,eL1,eL2,eL3,eL4,eL5,aC1,aC2,aC3,aC4,disR1,disR2,disR3,disR4,disR5, difR1,difR2,difR3,difR4,difR5,difR6,dC1,dC2,dC3,dC4,aB1,aB2,aB3,aB4,aB5,deh1,deh2,deh3,deh4) mydata.cov <- cov(mDPDF) model.mydata <- specify.model() MJ -> mj1, NA, 1 MJ -> mj2, lam2, NA MJ -> mj3, lam3, NA MJ -> mj4, lam4, NA MJ -> mj5, lam5, NA EL -> eL1, NA, 1 EL -> eL2, lam7, NA EL -> eL3, lam8, NA EL -> eL4, lam9, NA EL -> eL5, lam10, NA AC -> aC1, NA, 1 AC -> aC2, lam12, NA AC -> aC3, lam13, NA AC -> aC4, lam14, NA DISR -> disR1, NA,...
2013 Mar 12
1
Bootstrap BCa confidence limits with your own resamples
I like to bootstrap regression models, saving the entire set of bootstrapped regression coefficients for later use so that I can get confidence limits for a whole set of contrasts derived from the coefficients. I'm finding that ordinary bootstrap percentile confidence limits can provide poor coverage for odds ratios for binary logistic models with small N. So I'm exploring BCa confidence
2003 Apr 24
2
R-1.7.0 build feedback: NetBSD 1.6 (PR#2837)
R-1.7.0 built on NetBSD 1.6, but the validation test suite failed: Machinetype: Intel Pentium III (600 MHz); NetBSD 1.6 (GENERIC) Remote gcc version: gcc (GCC) 3.2.2 Remote g++ version: g++ (GCC) 3.2.2 Configure environment: CC=gcc CXX=g++ LDFLAGS=-Wl,-rpath,/usr/local/lib make[5]: Entering directory `/local/build/R-1.7.0/src/library' >>> Building/Updating
2011 May 16
0
SEM Model Not Converging
...= N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge. I tried setting par.size='startvalues' and it didn't make any difference. Is it just the size of my model? F1->reFDE, lam1, NA F1->ReFUIDGreg, lam2, NA F1->reFDRwithDDRV, lam3, NA F1->reparD, lam4, NA F1->reparDR, lam5, NA F1->reparRisk, lam6, NA F1->reWDD, lam7, NA F1->reWDH, lam8, NA F1->reWSP, lam9, NA F1->reWDIS, lam10, NA F1->reWCell, lam11, NA F1->reWFAT, lam12, NA F1->reAanx, lam13, NA F1->reDanx, lam...
2009 Mar 30
2
HELP WITH SEM LIBRARY AND WITH THE MODEL'S SPECIFICATION
...X3n,X$X3o,X$X3p,X$X3q,X$X3r,X$X3s,X$X3t,X$X3u,X$X3v,X$X4a,X$X5q,X$X5r,X$X5s,X$X8a,X$X8b,X$X8c,X$X8d) #i calculate the covariance of the data mydata.cov <- cov(mydata,use="complete.obs") #I specify my model model.mydata <- specify.model() F1 -> X.X12a, lam1, NA F1 -> X.X12b, lam2, NA F1 -> X.X12c, lam3, NA F1 -> X.X12d, lam4, NA F1 -> X.X12e, lam5, NA F1 -> X.X12f, lam6, NA F1 -> X.X12g, lam7, NA F2 -> X.X12h, lam8, NA F2 -> X.X12i, lam9, NA F2 -> X.X12l, lam10, NA F2 -> X.X12m, lam11, NA F2 -> X.X12n, lam12, NA F2 -> X.X12...
2009 Apr 01
0
回复: R-help Digest, Vol 73, Issue 32
...X3n,X$X3o,X$X3p,X$X3q,X$X3r,X$X3s,X$X3t,X$X3u,X$X3v,X$X4a,X$X5q,X$X5r,X$X5s,X$X8a,X$X8b,X$X8c,X$X8d) #i calculate the covariance of the data mydata.cov <- cov(mydata,use="complete.obs") #I specify my model model.mydata <- specify.model() F1 ->  X.X12a, lam1, NA F1 ->  X.X12b, lam2, NA F1 ->  X.X12c, lam3, NA F1 ->  X.X12d, lam4, NA F1 ->  X.X12e, lam5, NA F1 ->  X.X12f, lam6, NA F1 ->  X.X12g, lam7, NA F2 ->  X.X12h, lam8, NA F2 ->  X.X12i, lam9, NA F2 ->  X.X12l, lam10, NA F2 ->  X.X12m, lam11, NA F2 ->  X.X12n, lam12, NA F2 ->  X.X12...