search for: startvalues

Displaying 18 results from an estimated 18 matches for "startvalues".

2011 May 11
1
Problem with constrained optimization with maxBFGS
...o: sum D= 1 (BTW, n is less than 300) I´ve tried to use maxBFGS, as follows: ##################################### objectiveFunction<-function(x) { return(t(D)%*%W%*%D) } Amat<-diag(nrow(D)) Amat<-rbind((rep(-1, nrow(D))), Amat) bvec<-matrix( c(0), nrow(D)+1, 1) bvec[1,1]<-c(1) startValues=rep(1/nrow(D),nrow(D)) #Istart value is homogeneous distribution res <<- maxBFGS(objectiveFunction, start=startValues, constraints=list(ineqA=Amat, ineqB=bvec)) ######################################## The outcome is equal to the startValues. I´ve tried several initial values and nothing chan...
2005 Mar 09
2
Structural equation models with R
Hello useRs, I`m running structural equation models with R, but for one of my models the below error message apears. I`m trying to change startvalues but without success. The manual for sem package did not help me. Does anyone knows how to change startvalues for iteration in sem package? Or it can be another problem with the model? Error in startvalues(S, ram, debug = debug, tol = start.tol) : subscript out of bounds The model (with three...
2009 Dec 01
1
Adding and Multiplying two Unevaluated Expressions
HI, As I'm trying to compute Taylor series, I'm having problems in adding and multiplying unevaluated expressions. I searched for a solution but found none. my Taylor function works fine for evaluating functions as you can see here: rTaylorVal=function(exp,x0,dx,n) { ls=list(x=x0) newexp=eval(exp,ls) exp0=exp for (i in 1:n){ exp0=D(exp0,"x")
2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
...function as follows. Thank you all in advance. # Main program rm(list=ls()) x <- c(0,1,3,4,5,2,10,4,6,8,7) y <- seq(0,10,1) ftestnls(x,y) # Call the function # function 'ftestnls(v1,v2)' # v1 <- x # v2 <- y ftestnls <- function(v1,v2){ datalist <- list(v1=v1,v2=v2) startvalues <- list(a0=v1[1],a1=0,a2=0) # Perform nonlinear regression require(nls2) nlsmodel <- nls(v1~a0 + a1*v2 + a2 *sin(2*pi*v2/365.25),data=datalist,start=startvalues, trace=TRUE) # Fitted data and prediction interval fitted <- predict(as.lm(nlsmodel),se.fit=TRUE,interval="c...
2004 Jun 17
0
beta regression in R
...lt;- as.matrix(x) YP <- as.vector(y) xbeta <- X %*% par[1:K] p <- par[K1:K1] sum( -lgamma(p) +lgamma(p+(p/xbeta-p)) -lgamma(p/xbeta-p) +(p-1)*log(YP) +log(1-YP)*(p/xbeta-p-1) ) } llik.beta # Now use the above function to estimate the model. First, create a set of reasonable start values. startvalues <- c(coefficients(ols.model),74) startvalues # Now call optim mod.beta <- optim(startvalues,llik.beta, method = "BFGS", control = list(trace, maxit=1000,fnscale = -1), hessian = TRUE) mod.beta B. Dan Wood, Professor and University Faculty Fellow Texas A&M University Departme...
2004 Jan 02
2
SEM help!!!
I have just started using the SEM package in R, so I'm not sure I'm doing everything right, but I keep getting an error concerning startvalues and I can't figure out how to fix it. Is anyone willing to read over my code and help me out??? Please email me if you are willing to look at my code and I will send it to you. Thank you so much, and Happy New Year! cathy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
2004 Sep 29
2
optim "a log-likelihood function"
...gamma(r+1)*(alpha/alpha+t[i]))**r)*(t[i]/alpha+t[i]))**trans[i] } return(sum(l)) } i'm confused how i have to set r and alpha and i found no related help in archives? ...in Excel it works with solver but only for ~65.000 rows :-) #This notation is 1 for trans and 1 for time instead the Startvalues for r and alpha? optim(c(1,1),-LL) many thanks for an easy example or hint regards,christian
2009 Dec 02
0
[Fwd: Re: Adding and Multiplying two Unevaluated Expressions]
-------- Original-Nachricht -------- Betreff: Re: [R] Adding and Multiplying two Unevaluated Expressions Datum: Tue, 01 Dec 2009 23:49:39 +0100 Von: Benjamin M?ller <ben_mueller.bm at web.de> An: Rolf Turner <r.turner at auckland.ac.nz> Referenzen: <20091201144125.316310 at gmx.net> <8E40E49F-E8FC-4FBD-8CC5-93789FFB0E53 at auckland.ac.nz> This works fine for your
2004 May 12
1
Sem error - subscript out of bounds
...NA [3,] 1 3 6 3 NA [4,] 1 4 6 4 NA [5,] 1 1 7 5 NA [6,] 1 2 7 6 NA [7,] 1 5 7 7 NA [8,] 1 6 8 8 NA [9,] 1 7 8 9 NA [10,] 2 6 7 10 NA Error in startvalues(S, ram, debug = debug, tol = start.tol) : subscript out of bounds > Celpe.cov T1 T2 T3 T4 PI T1 1.2459212 0.6072653 0.6410553 0.4030267 0.7001731 T2 0.6072653 0.9369251 0.5762526 0.3293337 0.6282211 T3 0.6410553 0.5762526 1.5346904 0.3888291 0.60641...
2007 Apr 11
1
creating a path diagram in sem
...;-> ANXIETY, phi_AA, NA DEPRESS <-> DEPRESS, phi_DD, NA FEAR <-> FEAR, phi_FF, NA ANXIETY <-> FEAR, phi_AF, NA ANXIETY <-> DEPRESS, phi_AD, NA DEPRESS <-> FEAR, phi_DF, NA # Running the estimation using sem: sem.anxiety1<-sem(model1, COVAR, N=150, par.size="startvalues") # Looking at the results: summary(sem.anxiety1) # Calling modification indices: mod.indices(sem.anxiety1) summary(mod.indices(sem.anxiety1)) # Creating a path diagram path.diagram(model1,minrank='a1,a2,a3,d1,d2,d3,f1,f2,f3', maxrank='ANXIETY,DEPRESS,FEAR') Thank you very...
2014 Mar 19
3
[LLVMdev] getElapsedWallTime unnecessary heap allocation and memory leak
In the file \lib\Support\Process.cpp on line 60, it seems as though an unnecessary heap allocation and memory leak occurs. This is the offending code: static TimeValue getElapsedWallTime() { static TimeValue &StartTime = *new TimeValue(TimeValue::now()); return TimeValue::now() - StartTime; } The issue is that the StartTime variable's value is allocated on the heap, after which a
2013 Oct 23
0
[LLVMdev] First attempt at recognizing pointer reduction
On Oct 23, 2013, at 3:10 PM, Renato Golin <renato.golin at linaro.org> wrote: > On 23 October 2013 16:05, Arnold Schwaighofer <aschwaighofer at apple.com> wrote: > In the examples you gave there are no reduction variables in the loop vectorizer’s sense. But, they all have memory accesses that are strided. > > This is what I don't get. As far as I understood, a
2013 Oct 23
2
[LLVMdev] First attempt at recognizing pointer reduction
On 23 October 2013 16:05, Arnold Schwaighofer <aschwaighofer at apple.com>wrote: > In the examples you gave there are no reduction variables in the loop > vectorizer’s sense. But, they all have memory accesses that are strided. > This is what I don't get. As far as I understood, a reduction variable is the one that aggregates the computation done by the loop, and is used
2009 Jan 26
1
sem package: start values
Hello- If I input a variance-covariance matrix and specify NA for start values, how does sem determine the start value? Is there a default? Anthony -- Anthony Steven Dick, Ph.D. Post-Doctoral Fellow Human Neuroscience Laboratory Department of Neurology The University of Chicago 5841 S. Maryland Ave. MC-2030 Chicago, IL 60637 Phone: (773)-834-7770 Email: adick at uchicago.edu Web:
2007 Apr 09
3
sem vs. LISREL: sem fails
I am new to R. I just tried to recreate in R (using sem package and the identical input data) a solution for a simple measurment model I have found before in LISREL. LISREL had no problems and converged in just 3 iterations. In sem, I got no solution, just the warning message: "Could not compute QR decomposition of Hessian. Optimization probably did not converge. in: sem.default(ram =
2011 May 16
0
SEM Model Not Converging
...te is probably solution. However, at the end of the process I get this message: Warning message: In sem.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, la...
2012 Mar 12
1
SEM eigen value error 0 X 0 matrix
Using R-studio, I am trying to run a structural equation model and I am running into problems with testing my primary model. Once I specify everything and try to run it I get this error: Error in eigen(S, symmetric = TRUE, only.values = TRUE) : 0 x 0 matrix And when I look at the object for my primary model in my workspace, which is created after I specify it, it lists all my model components,
2009 Nov 25
4
Structural Equation Models(SEM)
Hi R-colleagues. In the sem-package i have a problem to introduce hidden variables. As a simple example I take an ordinary factor analysis. The program: cmat=c(0.14855886, 0.05774635, 0.08003300, 0.04900990, 0.05774635, 0.18042029, 0.11213013, 0.03752475, 0.08003300, 0.11213013, 0.24646337, 0.03609901, 0.04900990, 0.03752475, 0.03609901, 0.31702970)