search for: lam1

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

Did you mean: lam
2006 Oct 03
1
do.call with Vectorial Argument
...function are given with a vector (I 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...
2006 Sep 22
4
Creating Movies with R
...e user. 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<-...
2010 Nov 15
2
Zero truncated Poisson distribution & R2WinBUGS
...counted during the 3 consecutive visits (2) The second part of the script calls WinBUGS and run the binomial mixture models on the count data. In this case the count matrix y was converted to a vector C1 before being passed over to BUGS Any idea how to create a zero truncated Poisson for parameter lam1 (i.e., parameter lambda of the Poisson distribution) Thank you for your help. #R script #Simulated abundance data n.site <- 200# 200 sites visited lam <- 5 #mean number of animals per site R <- n.site # nubmer of sites T <- 3 # Number of replicate counts at each site N=rpois(n = n....
2009 Nov 09
0
unexpected results involving the skellam distribution
...kellam-distributed 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)...
2013 Mar 18
1
"save scores" from sem
...by multiplication the 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 (num...
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 23
0
Fixing error variance in a path analysis to model measurement error in scales using sem package
...(rRU)) power_alt -> em, iota1 power_alt <-> power_alt, NA, (1 - alpha(power_alt))*(variance(power_alt)) ms_alt -> em, zeta1 ms_alt <-> ms_alt, NA, (1 - alpha(ms_alt))*(variance(ms_alt)) em -> relM1, eta1 em <-> em, NA, (1 - alpha(em))*(variance(em)) relM1 <-> relM1, lam1 After testing this model, the model fits were unnaceptable and package sem could not compute modification instances. In contrast, when I do not fix error variances, after a few modifications to the model, I am able to reach a theoretical cogent model that has acceptable model fits. I have several...
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
2011 May 16
0
SEM Model Not Converging
....default(ram = ram, S = S, N = 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,...
2009 Mar 30
2
HELP WITH SEM LIBRARY AND WITH THE MODEL'S SPECIFICATION
...,X$X3h,X$X3i,X$X3l,X$X3m,X$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,...
2008 Apr 01
4
Trying to get Effect.Appear, Scale, Fade to work
================================================= Mon-03-31-2008, 11:04pm U.S.EDT Hello, I''m trying to get a website entry page to work properly, while learning Scriptaculous effects and javascript at the same time. I wanted to use a couple of effects to add a little flash-style animation. I managed to get the initial Appear to work but with a problem: the image that''s supposed
2009 Apr 01
0
回复: R-help Digest, Vol 73, Issue 32
...,X$X3h,X$X3i,X$X3l,X$X3m,X$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,...