Forum: help
Monitor Forum | Start New ThreadRE: nlssystemfit predict/SE function [ Reply ] By: liang ruiting on 2020-08-06 13:36 | [forum:48027] |
dear David, i meet a similar probelm.And l would be very appreciarted to know you haow to solve this problem. Respectfully, ting. |
RE: nlssystemfit predict/SE function [ Reply ] By: David Auty on 2012-09-18 13:16 | [forum:19830] |
Jeff, Many thanks for your response. I thought this might be the case, and will give it some thought. If I can think of a way to do it, I'll let you know. Kind regards, Dave |
RE: nlssystemfit predict/SE function [ Reply ] By: Jeff Hamann on 2012-09-07 17:12 | [forum:17503] |
David, I think you'll have to author this function. The nlsystemfit was written about 10 years ago and is a very rough first draft. The nlsystemfit could use a the development and your contribution would be greatly appreciated. Respectfully, Jeff. Jeff Hamann, PhD PO Box 1421 Corvallis, Oregon 97339-1421 230 SW 3rd Street Suite #310 Corvallis, Oregon 97333 541-602-5438 (c) 541-754-2457 (h) jeff.hamann[at]forestinformatics[dot]com jeff.d.hamann[at]gmail[dot]com http://www.forestinformatics.com http://en.wikipedia.org/wiki/Forest_informatics |
nlssystemfit predict/SE function [ Reply ] By: David Auty on 2012-09-01 11:51 | [forum:15936] |
Dear systemfit forum, I have simultaneously estimated 2 nonlinear equations as follows: library(systemfit) rw.formula <- rw ~ a1*exp(a2*age) + a3 moe.formula <- moe ~ (b1+b4*rw)*(1-exp((b2)*age)) + b3 labels <- list("ring.width", "moe") start.values =c(a1=1.5, a2=-0.03, a3=0.4, b1=9, b2=-0.1, b3=3, b4=-1.5) model <- list(rw.formula, moe.formula) model.ols <- nlsystemfit("OLS", model, start.values, data=data, eqnlabels=labels) model.sur <- nlsystemfit("SUR", model, start.values, data=data, eqnlabels=labels) print(model.sur) #but when I try and extract the model predictions:: predict(model.ols) predict(model.sur) I get the following error: Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "nlsystemfit.system" Is it possible to extract the combined predictions in such a case? I could write a function to perform this task, but I was also hoping to extract the SEs of the predictions to. The documentation gives examples but theseseem to apply only to simultaneous linear model fits. Any help would be greatly appreciated. Many thanks, Dave Auty Stagiaire Postdoctoral Département des sciences du bois et de la forêt Pavillon Gene-H.-Kruger Université Laval , 2425, rue de la Terrasse Québec (QC) G1V 0A6 |