similar to: nls for sum of exponentials

Displaying 20 results from an estimated 200 matches similar to: "nls for sum of exponentials"

2012 Jan 17
1
MuMIn package, problem using model selection table from manually created list of models
The subject says it all really. Question 1. Here is some code created to illustrate my problem, can anyone spot where I'm going wrong? Question 2. The reason I'm following a manual specification of models relates to the fact that in reality I am using mgcv::gam, and I'm not aware that dredge is able to separate individual smooth terms out of say s(a,b). Hence an additional request,
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
This question comes up periodically, probably enough to give it a proper thread and maybe point to this thread for reference (similar to the 'conservative anova' thread not too long ago). Moving from lme syntax, which is the function found in the nlme package, to lmer syntax (found in lme4) is not too difficult. It is probably useful to first explain what the differences are between the
2003 Oct 15
2
Example of cell means model
This is an example from chapter 11 of the 6th edition of Devore's engineering statistics text. It happens to be a balanced data set in two factors but the calculations will also work for unbalanced data. I create a factor called 'cell' from the text representation of the Variety level and the Density level using '/' as the separator character. The coefficients for the linear
2004 Apr 22
1
lme correlation structure error
Hi there fellow R-users, I am trying to follow an example of modelling a serial correlation structure in the textbook "Mixed Effects Model in S and Splus". However, I am getting some very odd results. Here is what I am trying to run: library(nlme) data(Ovary) fm1<-lme(follicles~sin(2*pi*Time)+cos(2*pi*Time),data=Ovary,random=pdDiag(~s in(2*pi*Time))) ### The example is fine up
2011 Jun 15
1
Print the summary of a model to file
Hi there, I am having a strange problem. I am running nls on some data. #data x <- -(1:100)/10 y <- 100 + 10 * (exp(-x / 2) Using nls I fit an exponential model to this data and get a great fit summary(fit) Formula: wcorr ~ (Y0 + a * exp(m1 * -dist/100)) Parameters: Estimate Std. Error t value Pr(>|t|) Y0 -0.0001821 0.0002886 -0.631 0.528 a 0.1669675 0.0015223
2006 Sep 06
1
Help on estimated variance in lme4
Dear all, I get an error message when I run my model and I am not sure what to do about it. I try to determine what factors influence the survival of voles. I use a mixed-model because I have several voles per site (varying from 2 to 19 voles). Here is the model: ### fm5 <-lmer(data=cdrgsaou2, alive~factor(pacut)+factor(agecamp)+factor(sex)+ResCondCorp+(1|factor(cdrgsa ou2$ids)),
2009 Feb 15
0
Kalman Filter - dlm package
Dear all, I am currently trying to use the "dlm" package for Kalman filtering. My model is very simple: Y_t = F'_t Theta_t + v_t Theta_t = G_t Theta_t-1 + w_t v_t ~ N(0,V_t) = N(0,V) w_t ~ N(0,W_t) = N(0,W) Y_ t is a univariate time series (1x1) F_t is a vector of factor returns (Kx1) Theta_t is the state vector (Kx1) G_t is the identity matrix My first
2002 Aug 11
1
Ordinal categorical data with GLM
Hello All: I am looking for you help. I am trying to replicate the results of an example found in Alan Agresti's "Categorical Data Analysis" on pages 267-269. The example is one of a 2 x 2 cross-classification table of ordinal counts: job satisfaction and income. I am able to get Agresti's results for the independence model (G^2 = 12.03 with df = 9) assuming as he does that
2009 Jul 06
1
Nonblocking connect is not proprly checked in poll implementation
Hello, I found a bug in Icecast-2.3.2. SVN trunk is affected either. The problem lies in src/net/sock.c: sock_connected() function. This function is used to check status of socket after nonblocking connect(2) and it has two implementations: select(2) and poll(2). The select branch does the right job---it gets socket status by getsockopt(2) after selecting for write. But the poll branch does not.
2002 Apr 11
14
Ordinal categorical data with GLM
Hello All: I am trying to replicate the results of an example found in Alan Agresti's "Categorical Data Analysis" on pages 267-269. The example is one of a 2 x 2 cross-classification table of ordinal counts: job satisfaction and income. I am able to get Agresti's results for the independence model (G^2 = 12.03 with df = 9) assuming as he does that the data is nominal, but
2012 Feb 10
3
Schwefel Function Optimization
All, I am looking for an optimization library that does well on something as chaotic as the Schwefel function: schwefel <- function(x) sum(-x * sin(sqrt(abs(x)))) With these guys, not much luck: > optim(c(1,1), schwefel)$value [1] -7.890603 > optim(c(1,1), schwefel, method="SANN", control=list(maxit=10000))$value [1] -28.02825 > optim(c(1,1), schwefel, lower=c(-500,-500),
2012 Feb 10
3
Schwefel Function Optimization
All, I am looking for an optimization library that does well on something as chaotic as the Schwefel function: schwefel <- function(x) sum(-x * sin(sqrt(abs(x)))) With these guys, not much luck: > optim(c(1,1), schwefel)$value [1] -7.890603 > optim(c(1,1), schwefel, method="SANN", control=list(maxit=10000))$value [1] -28.02825 > optim(c(1,1), schwefel, lower=c(-500,-500),
2008 Jul 30
2
Sampling two exponentials
Hi all, I am going to sample two variables from two exponential distributions, but I want to specify a covariance structure between these two variables. Is there any way to do it in R? Or is there a "Multivariate Exponential" thing corresponding to the multivariate normal? Thanks in advance. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel:
2006 Jan 28
1
Complex Matrix Exponentials.
Hello, I was curious if there was a complex valued matrix exponential function available for R? I have some Laplace transforms of occupation times for a hidden Markov model. The matrix exponential function in the msm package does not seem to handle complex values. For example > MatrixExp(diag(1i,2)) [,1] [,2] [1,] 1 0 [2,] 0 1 Warning message: imaginary parts
2011 Apr 14
2
Krylov subspace computations of matrix exponentials
I use the very nice expm functions available from the expm and Matrix packages. My understanding is that for large sparse matrices the currently best methods available are Krylov subspace methods, but they are as far as I can tell not implemented in either of the packages mentioned, nor in any other R package I have found. Does anybody know if Krylov subspace methods are available from any R
2007 Oct 30
2
flexible processing
Hello, unfortunately, I don't know a better subject. I would like to be very flexible in how to process my data. Assume the following dataset: par1 <- seq(0,1,length.out = 100) par2 <- seq(1,100) fac1 <- factor(rep(c("group1", "group2"), each = 50)) fac2 <- factor(rep(c("group3", "group4", "group5", "group6"), each =
2009 Dec 29
2
pass functions and arguments to function
Hi, I wonder how to pass several functions and their arguments as arguments to a function. For example, the main function is f = function(X ) { process1(X) ... process2(X) } I have a few functions that operate on X, e.g. g1(X, par1), g2(X, par2), g3(X, par3). par1, par2 and par3 are parameters and of different types. I would like to pass g1, g2, g3 and their arguments to f and g1,
2006 Feb 08
1
expand.grid without expanding
Dear list, I've recently came across a problem that I think I've solved and that I wanted to share with you for two reasons: - Maybe others come across the same problem. - Maybe someone has a much simpler solution that wants to share with me ;-) The problem is as follows: expand.grid() allows you to generate a data.frame with all combinations of a set of values, e.g.: >
2007 Dec 19
2
recode based on filter
Hi, I have a data frame DATA, which (simplified of course) looks like this: know1 = c("Y","N","N","Y","N","N","Y","Y","N") par1=c(1,4,5,3,3,2,3,3,5) know2 = c("Y","Y","N","Y","N","N","N","Y","Y")
2008 Aug 26
1
no output when run densityplot...
Hi, I have downloaded a R script from http://www.wessa.net/rwasp_edauni.wasp#output. This script produces a densityplot graphic, amongst others, when is executed from the web page. However, when I run it in my machine the *densityplot* function produces any output, I mean a blank graphic. But, it's interesting if I run the following lines in the R interactive console: > y <-