search for: psi1

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

Did you mean: psi
2012 Oct 23
1
Minimizing Computational Time
...he main programme. For instance, is there any smart way for the following programme that will lessen time? --------------------------------------------------------------------------------------------------------------- dose<-seq(0,10,.5) alpha1<--4 beta1<-0.5 alpha2<--6 beta2<--.7 psi1<-function(alpha1,beta1,alpha2,beta2,d){ z1<-exp(alpha1+beta1*d) z2<-exp(alpha2+beta2*d) z1/((1+z1)*(1+z2)) } psi2<-function(alpha2,beta2,d) { z2<-exp(alpha2+beta2*d) z2/(1+z2)...
2003 Dec 18
1
NUMERIC DERIVATE
UseRs, I used the optim function valor.optim <- optim(c(1,1,1),logexp1,method ="BFGS",control=list(fnscale=-1),hessian=T); and I want to calculate the derivates, psi1<-valor.optim$par[1] psi2<-valor.optim$par[2] psi3<-valor.optim$par[3] a0=exp(psi1); a1=exp(psi2)/(20+exp(psi2)+exp(psi3)); a2=exp(psi3)/(20+exp(psi2)+exp(psi3)) deriv.psi1<-numericDeriv(a0,c("psi1","psi2","psi3")); d...
2012 Oct 02
3
Integration in R
...----------------------------------------------------------------------- library(cubature) dose<-c(2,3,5) y0<-c(2,1,0) y1<-c(1,1,1) y2<-c(0,1,2) lf<-function (x) { v<-1 for (i in 1:length(dose)) { psi0<-1/((1+exp(x[1]+x[2]*dose[i]))*(1+exp(x[3]+x[4]*dose[i]))) psi1<-exp(x[1]+x[2]*dose[i])/((1+exp(x[1]+x[2]*dose[i]))*(1+exp(x[3]+x[4]*dose[i]))) v<-v*(psi0^y0[i])*(psi1^y1[i])*((1-psi0-psi1)^y2[i]) } return(v) } adaptIntegrate(lf, lowerLimit = c(-20, 0,-20,0), upperLimit = c(0,10,0,10)) --------------------------------------...
2013 Mar 11
2
vertical lines in R plot
...e more specific, I wish to draw vertical lines at d=c(5.0,5.5,6) and they should go till p=c(0.12,0.60,0.20) . I haven't found any way out, though made several attempts. Please run the following commands first if you are interested in! ####################################################### psi1<-function(alpha1,beta1,alpha2,beta2,d){ exp(alpha1+beta1*d)/((1+exp(alpha1+beta1*d))*(1+exp(alpha2+beta2*d))) } alpha1<--3.5 beta1<-1 alpha2<--6 beta2<-0.72 d<-seq(0.5,10,0.01) plot(d,psi1(alpha1,beta1,alpha2,beta2,d),type="l",...
2006 Jan 18
1
Breakpoints for multiple variables using Segmented
Hi all, I am using the package ?Segmented? to estimate logistic regression models with unknown breakpoints (see Muggeo 2003 Statistics in Medicine 22:3055-3071). In the documentation it suggests that it might be possible to include several variables with breakpoints in the same model: ?Z = a vector or a matrix meaning the (continuous) explanatory variable(s) having segmented relationships with
2013 Jul 22
1
Error with sem function df = -6
...tell me what is wrong with my model? Thank you. Here is the code: model.ram1 <- specifyModel() UNIT -> Y1, ty,0.3 UNIT -> Z1, tz1,-0.1 UNIT -> Z2, tz2,0.1 CF -> Y1, lamy,0.5 CF -> Z1, lamz1,0.85 CF -> Z2, lamz2,0.2 UNIT -> CF, k Y1 <-> Y1, psi3, NA Z1 <-> Z1, psi1, NA Z2 <-> Z2, psi2, NA CF <-> CF,vCF1,NA sem.m1<-sem(model=model.ram1,S=S2,N=500,fixed.x="UNIT",raw=T) -- I.J. Williams Ph.D. Student in Education Measurement and Statistics Statistics MS Mathematics BS Rutgers University [[alternative HTML version deleted]]
2013 Jan 11
1
problems with package 'segmented'
...,2] time.WC <- X[,3] olm <- lm(y~0+ group + time.KV + time.KW + time.WC) os <- segmented(olm, seg.Z= ~ time.KV + time.KW + time.WC, psi=list(time.KV=c(300,500), time.KW=c(450,600), time.WC=c(300,450))) The error message is as follows: Error in `rownames<-`(`*tmp*`, value = c("psi1.time.KV", "psi2.time.KV", : Length of 'dimnames' [1] not equal to array extent Zusätzlich:Warnmeldung: In cbind(initial, psi, sqrt(vv)) : number of rows of result is not a multiple of vector length (arg 2) However, when I take out one break.point from any of the gro...
2004 Feb 26
2
Structural Equation Model
Hello all! I want to estimate parameters in a MIMIC model. I have one latent variable (ksi), four reflexive indicators (y1, y2, y3 and y4) and four formative indicators (x1, x2, x3, x4). Is there a way to do it in R? I know there is the SEM library, but it seems not to be possible to specify formative indicators, that is, observed exogenous variables which causes the latent variable. Thanks,
2012 Nov 16
1
Interpretation of davies.test() in segmented package
...ernative hypothesis: less segments <- segmented(lmfit, seg.Z=~HRRPUA_kWm2,psi=c(475,550)) summary(segments) ***Regression Model with Segmented Relationship(s)*** Call: segmented.glm(obj = lmfit, seg.Z = ~HRRPUA_kWm2, psi = c(475, 550)) Estimated Break-Point(s): Est. St.Err psi1.HRRP 430.2 4.087 psi2.HRRP 484.6 3.077 t value for the gap-variable(s) V: 0 0 Meaningful coefficients of the linear terms: Estimate Std. Error t value Pr(>|t|) (Intercept) -38.6993 274.7666 -0.141 0.8891 HRRPUA_kWm2 1.4297 0.7472 1.914 0.0668 . U1.HRRP 42.288...
2007 Jun 27
1
SEM model fit
...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 -> enf, a1, 0.2 incomex -> enf, a2, 0.2 oftdrnkr...
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
2010 Nov 21
3
R help
Dear All, I'm a beginner user in R and I would like to make a quadratic and plateau model in R. Can you help please with an example? Thanks so much -- Ahmed M. Attia Assistant Lecturer El-Khattara farm Station Agronomy Dept., Zgazig Univ., Egypt Visiting Scientist Haskell Agricultural laboratory Agronomy and Horticultural Dept., Univ. of Nebraska-Lincoln ahmedatia at zu.edu.eg
2001 Nov 25
2
another optimization question
Dear R list members, Since today seems to be the day for optimization questions, I have one that has been puzzling me: I've been doing some work on sem, my structural-equation modelling package. The models that the sem function in this package fits are essentially parametrizations of the multinormal distribution. The function uses optim and nlm sequentially to maximize a multinormal