Displaying 20 results from an estimated 100 matches similar to: "More help need on Von Bertalanffy Growth Curves"
2012 Sep 04
3
Comparing Von Bertalanffy Growth Curves
I am trying to compare Vbert growth curves from several years of fish data. I am following the code provided by: http://www.ncfaculty.net/dogle/fishR/gnrlex/VonBertalanffy/VonBertalanffy.pdf. Specifically the section on VBGM Comparisons between groups.
?
This code is pretty cut and dry. I am able to run it perfectly with the "fake" data that is provided. But when I run it with my own
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
str(Empdata)
Empdata$gnipc<-as.numeric(Empdata$gnipc)
install.packages("systemfit")
library("systemfit")
pdata <- plm.data(Empdata,
2018 May 29
0
How to generate a conditional dummy in R?
Hi Faradj,
What a problem! I think I have worked it out, but only because the
result is the one you said you wanted.
# the sample data frame is named fkdf
Y2Xby3<-function(x) {
nrows<-dim(x)[1]
X<-rep(0,nrows)
for(i in 1:(nrows-2)) {
if(!is.na(x$Y[i])) {
if(x$Y[i] == 1 && any(is.na(x$Y[(i+1):(i+2)]))) X[i]<-1
if(i > 1) {
if(X[i-1] == 1) X[i]<-0
}
}
2018 May 29
1
How to generate a conditional dummy in R?
Dear Jim,
wow! It worked! Thanks a lot.
I did as you suggested and it worked well with the real data. Although it gave me this error: Error in if (!is.na(x$Y[i])) { : argument is of length zero. For some reason the X1 produced less observations than it is in the data. But it's not a big deal - I identified those cases and simply deleted from the data (it was countries that only appeared
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end.
I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis.
I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2018 May 28
3
How to generate a conditional dummy in R?
Hi everyone,
I am trying to generate a conditional dummy variable ?X" with the following rules
set X=1 if Y is =1, two years prior to the NA. [0,0,NA].
For example, if the pattern for Y is 0,0,NA then the X variable is =0 for all the two years prior to the NA. If the pattern for Y is 0,1,NA or 1,0,NA then the X =1 . To be clear, if 1,1,NA then the X=1 that first specific year, it
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
install.packages("systemfit")
2003 Aug 26
1
Getting out of an embedded function safely - use try?
Helpers.
An instrument sends me data that is mostly nonlinear. I have a group of
functions to manipulate this data so that it is useful to the user. One
of them involves a nls model that called to fit a line to the data and
returns the fits. This works well 99 out of 100 times. Occasionally, the
sensor sends some bad data to which a nls model cannot be fit. When that
happens, the nls function
2006 Jul 14
3
Migration not updating fields
So I have this fairly basic migration bit of code
class AddCounterCache < ActiveRecord::Migration
def self.up
add_column ''products'', ''backlog_items_count'', :integer, :default =>
0
end
def self.down
remove_column ''products'', ''backlog_items_count''
end
end
What I want to do in that is automatically
2006 May 24
1
problem-nlme
Hi,
I have great problems with my work in R.
I look for to model the growth of fish.
I have "Longitudinal data", a serie of repeated
measures for each individual.
Using the corresponding packages "nlme" in R.
I treat to fit to the data different growth functions,
wich were entered by me.
Unfortunately for no it was arrived at the
convergence, several error messages appeared.
I
2006 Jan 26
0
degrees freedom in nlme
I'm having hard time understanding the computation of degrees of freedom when runing nlme () on the following model:
> formula(my data.gd)
dLt ~ Lt | ID
TasavB<- function(Lt, Linf, K) (K*(Linf-Lt))
my model.nlme <- nlme (dLt ~ TasavB(Lt, Linf, K),
data = my data.gd,
fixed = list(Linf ~ 1, K ~ 1),
start = list(fixed = c(70, 0.4)),
na.action= na.include,
2006 Jan 27
1
how calculation degrees freedom
Hi, I' m having a hard time understanding the computation of degrees of freedom when runing nlme() on the following model:
> formula(my data.gd)
dLt ~ Lt | ID
TasavB<- function(Lt, Linf, K) (K*(Linf-Lt))
my model.nlme <- nlme (dLt ~ TasavB(Lt, Linf, K),
data = my data.gd,
fixed = list(Linf ~ 1, K ~ 1),
start = list(fixed = c(70, 0.4)),
na.action= na.include,
2008 Feb 26
0
NLS -- multiplicative errors and group comparison
Hello,
I am attempting to fit a non-linear model (Von Bertalanffy growth model)
to fish length-at-age data with the purpose of determining if any of the
three parameters differ between male and female fish. I believe that I
can successfully accomplish this goal assuming an additive error
structure (illustrated in section 1 below). My trouble begins when I
attempt this analysis using a model
2012 Jan 25
1
Re: docs: Remove outdated LaTex documentation.
On Wed, 2012-01-25 at 15:55 +0000, Xen patchbot-unstable wrote:
> # HG changeset patch
> # User Keir Fraser <keir@xen.org>
> # Date 1327506767 0
> # Node ID 4271634e4c86568b6bf2241ebf9be4a82ab430bf
> # Parent a2a8089b1ffbf5757ca3191cb8f74a5f1ed7fed1
> docs: Remove outdated LaTex documentation.
Nice.
> @@ -82,7 +70,7 @@
> $(MAKE) -C xen-api clean
>
2011 Oct 08
1
Delete files with system command on Windows 7
Under MacOS I use the following script to process my latex documents:
pdflatex -halt-on-error document.tex
bibtex document.aux
pdflatex -halt-on-error document.tex
pdflatex -halt-on-error document.tex
rm *.aux *.bbl *.blg *.log *.nlo *.thm
How can I realise this under Windows 7?
--
View this message in context:
2001 Sep 07
3
fitting models with gnls
Dear R-list members,
Some months ago I wrote a message on the usage of gnls (nlme library) and here I come again.
Let me give an example:
I have a 10 year length-at-age data set of 10 fishes (see growth.dat at the end of this message) and I want to fit a von Bertalanffy growth model, Li= Linf*(1-exp(-k*(ti-t0))) where Li = length at age i, Linf= asymptotic length, k= curvature parameter, ti=
2007 Jun 14
1
R programming question
Dear All.,
I've created R-code for which a user will be asked to choose between 2
analyses. I've written one function for each type of analysis. Within
each function, the users is prompted to enter information. An example
is:
cat("Enter value for lower Linf :\n")
L1<-scan(n=1)
cat("Enter value for upper Linf :\n")
L2<-scan(n=1)
2012 Jan 17
2
How to loop on file names
Dear all,
I need to do the same procedure on several files. But I don't know how
to refer to the file name.
Here is an example of what I am trying to do.
List of files: file1(A,B,C, D1...Dn), file2(A,B,C,E1,...,En),
file3(A,B,C,F1,...,Fn)
Procedure I want to apply on each file:
dft <- melt(df,id=c('A','B','C'))
dft$X <- substr(dft$variable,1,3)
dft$Y <-
2006 Feb 22
0
Re: [PATCH] Fix IPSec for Xen checksum offload packets (Jon Mason)
Hello Xen folks,
I have independently verified that this patch indeed fixes the issue (I
posted a message about the issue over the summer:
http://lists.xensource.com/archives/html/xen-devel/2005-08/msg00114.html).
I used changeset 8911 of xen-unstable.hg. The patch as written expects
kernel linux-2.6.16-rc2, but changeset 8911 uses kernel 2.6.16-rc4. I
verified that the patch works with
2009 Dec 17
2
Sweave Makefile issue
Dear R-specialists,
I am trying to create a Makefile that will first convert all my .Rnw
files into .tex files and then, that will run the LaTeX compiler to
produce a pdf document. This issue has been discussed before. Hence,
I've basically adapted a Makefile I found at
http://n4.nabble.com/R-Sweave-R-and-complex-latex-projects-td810020.html#a810023
to make it compatible with a Windows