Displaying 2 results from an estimated 2 matches for "curvedata".
2010 Mar 26
3
Help with assigning a value based on existing numbers
...Month
1 Month or less
365 1-2 years
52 2-3 months
Etc
I have tried using if elseif (as shown below), but it kept coming up
with the error:
Error:
In if (curvedata$Date.difference == "NULL") { :
the condition has length > 1 and only the first element will be used
2: In if (curvedata$Date.difference <= 29) { :
the condition has length > 1 and only the first element will be used
3: In if (curvedata$Date.difference <= 59) { :
the...
2012 Feb 16
1
how to get r-squared for a predefined curve or function with "other" data points
...to
a sigmoid curve:
---
plot(
NA,
NA,
main="",
xlim=c(-20,0),
ylim=c(0,100),
xlab = "water potential [MPa]",
ylab = "percent loss of conductivity [%]",
xaxp = c(0,-20,4),
yaxp = c(0,100,5),
tck = 0.02,
mgp = c(1.5,0.1,0),
)
for(i in 1:3){
x <- subset(curvedata,Group == i)$MPa
y <- subset(curvedata,Group == i)$PLC
name <- subset(curvedata,Group == i)$Sample
points(x,y)
vlc <- nls(y ~ 100/(1+exp(a*(x-b))), start=c(a=1, b=-3), data=list(x,y))
curve(100/(1+exp(coef(vlc)[1]*(x-coef(vlc)[2]))), col=1, add = TRUE)
Rsquared <- 1 - var(resi...