Displaying 12 results from an estimated 12 matches for "fullfit".
Did you mean:
fullfil
2017 Jun 20
5
fitting cosine curve
....81, 17.91, 17.85, 17.70, 17.67, 17.45, 17.58, 16.99, 17.10)
t=c(7, 37, 58, 79, 96, 110, 114, 127, 146, 156, 161, 169, 176, 182,
190, 197, 209, 218, 232, 240)
I use the method to fit a curve, but it is different from the real curve,
which can be seen in the figure.
linFit <- lm(y ~ cos(t))
fullFit <- nls(y ~ A*cos(omega*t+C) + B,
start=list(A=coef(linFit)[1],B=coef(linFit)[2],C=0,omega=.4)) #omega cannot
be set to 1, don't know why.
co <- coef(fullFit)
fit <- function(x, a, b, c, d) {a*cos(b*x+c)+d}
plot(x=t, y=y)
curve(fit(x, a=co['A'], b=co['omega'], c=co['...
2017 Jun 21
1
fitting cosine curve
..., 17.10)
t=c(7, 37, 58, 79, 96, 110, 114, 127, 146, 156, 161, 169, 176, 182,
190, 197, 209, 218, 232, 240)
lidata <- data.frame(y=y, t=t)
#I use the method to fit a curve, but it is different from the real curve,
#which can be seen in the figure.
linFit <- lm(y ~ cos(t))
library(nlsr)
#fullFit <- nls(y ~ A*cos(omega*t+C) + B,
#start=list(A=coef(linFit)[1],B=coef(linFit)[2],C=0,omega=.4))
#omega cannot be set to 1, don't know why.
fullFit <- nlxb(y ~ A*cos(omega*t+C) + B, data=lidata,
start=list(A=coef(linFit)[1],B=coef(linFit)[2],C=0,omega=.04), trace=TRUE)
co <- coef(full...
2017 Jun 20
0
fitting cosine curve
...7.45, 17.58, 16.99, 17.10)
> t=c(7, 37, 58, 79, 96, 110, 114, 127, 146, 156, 161, 169, 176, 182,
> 190, 197, 209, 218, 232, 240)
>
> I use the method to fit a curve, but it is different from the real curve,
> which can be seen in the figure.
> linFit <- lm(y ~ cos(t))
> fullFit <- nls(y ~ A*cos(omega*t+C) + B,
> start=list(A=coef(linFit)[1],B=coef(linFit)[2],C=0,omega=.4)) #omega cannot
> be set to 1, don't know why.
> co <- coef(fullFit)
> fit <- function(x, a, b, c, d) {a*cos(b*x+c)+d}
> plot(x=t, y=y)
> curve(fit(x, a=co['A'], b=c...
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
...t different results of coef. Can someone
kindly explain.
# lasso using penalized
library(penalized)
pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE)
pena.fit2
coef(pena.fit2)
opt<-optL1(HRLNM,penalized=~CN+NoSus,fold=5)
opt$lambda
coef(opt$fullfit)
prof<-profL1(HRLNM,penalized=~CN+NoSus,fold=opt$fold,steps=20)
plot(prof$lambda, prof$cvl, type="l")
plotpath(prof$fullfit)
pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=opt$lambda,model="logistic",standardize=TRUE,steps=20)
plotpath(pena.fit2)
pena.fit2<-pena...
2017 Jun 21
1
fitting cosine curve
If you know the period and want to fit phase and amplitude, this is
equivalent to fitting a * sin + b * cos
> >>> > I don't know how to set the approximate starting values.
I'm not sure what you meant by that, but I suspect it's related to
phase and amplitude.
> >>> > Besides, does the method work for sine curve as well?
sin is the same as cos with
2017 Jun 21
0
fitting cosine curve
I'm trying the different parameters, but don't know what the error is:
Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial parameter estimates
Thanks for any suggestions.
On Tue, Jun 20, 2017 at 7:37 PM, Don Cohen <don-r-help at isis.cs3-inc.com>
wrote:
>
> If you know the period and want to fit phase and amplitude, this is
> equivalent to
2017 Jul 13
2
bnlearn and cpquery
...the cpquery in debug mode for such a case (n=10^5, method="lw")
creates the following output:
generated a grand total of 1e+05 samples.
> event has a probability mass of 14982.37 out of NaN (p = NaN).
[1] NaN
The cpquery command takes the following structure:
cpquery(fullFitted,event=(C1_class=="Med"),
evidence=list(GK_class = "ModHi",
GTh_class = "Lo",
GU_class = "Lo",
El_class = "Hi",
E50_class = "Med",...
2012 Sep 06
0
lme( y ~ ns(x, df=splineDF)) error
...paste("mylme<-lme(fixed= y ~ ns(x, df=", splineDF, ") , random= ~ 1 | ID , correlation = corAR1() , data=longdat)")
thecommandstring
eval(parse(text=thecommandstring))
} else {
stop(paste("WhichApproach=", WhichApproach, " not valid."))
}
mylme
longdat$fullfit<-predict(mylme)
library(ggplot2)
print(
ggplot( longdat, aes(x,y))
+ geom_point(shape=1)
+ facet_wrap( ~ ID )
+ geom_line( aes(x, fullfit), color="red")
)
invisible(mylme)
}
Jacob A. Wegelin
Assistant Professor
Department of Biostatistics
Virginia Commonwealth University
830...
2012 Sep 26
0
lme(y ~ ns(x, df=splineDF)) error
...aste("mylme<-lme(fixed= y ~ ns(x, df=", splineDF, ") , random= ~ 1 | ID , correlation = corAR1() , data=longdat)")
thecommandstring
eval(parse(text=thecommandstring))
} else {
stop(paste("WhichApproach=", WhichApproach, " not valid."))
}
mylme
longdat$fullfit<-predict(mylme)
library(ggplot2)
print(
ggplot( longdat, aes(x,y))
+ geom_point(shape=1)
+ facet_wrap( ~ ID )
+ geom_line( aes(x, fullfit), color="red")
)
invisible(mylme)
}
Jacob A. Wegelin
Assistant Professor
Department of Biostatistics
Virginia Commonwealth University...
2017 Jul 13
0
bnlearn and cpquery
...creates the following output:
>
>
>
> generated a grand total of 1e+05 samples.
>
> > event has a probability mass of 14982.37 out of NaN (p = NaN).
>
> [1] NaN
>
>
>
>
>
> The cpquery command takes the following structure:
>
>
>
> cpquery(fullFitted,event=(C1_class=="Med"),
>
> evidence=list(GK_class = "ModHi",
>
> GTh_class = "Lo",
>
> GU_class = "Lo",
>
> El_class = "Hi",
>
>...
2017 Jun 21
2
fitting cosine curve
...6, 182,
>>> > 190, 197, 209, 218, 232, 240)
>>> >
>>> > I use the method to fit a curve, but it is different from the real
>>> > curve,
>>> > which can be seen in the figure.
>>> > linFit <- lm(y ~ cos(t))
>>> > fullFit <- nls(y ~ A*cos(omega*t+C) + B,
>>> > start=list(A=coef(linFit)[1],B=coef(linFit)[2],C=0,omega=.4)) #omega
>>> > cannot
>>> > be set to 1, don't know why.
>>> > co <- coef(fullFit)
>>> > fit <- function(x, a, b, c, d) {a*cos(...
2001 May 24
0
nlme help please
...)/.5)), y<-18/(1+exp((2-time)/.5))
fixed effect for param a = 10,10, 20,20, random effects= +2, -2, +2, -2
fixed effect for param b=2, fixed effect for c = .5
normal noise with sd=1 was added to all y values.
I do:
df<-read.table(file="papers/alex/junk.dat",header=TRUE)
attach(df)
fullfit<-nlsList(y~SSlogis(Time,Asym,xmid,scal)|Subject,data=df)
and get the separate fits of the logistic to each subject's data. 4 curves
and 4 sets of param values (12 params total for the model).
How do I get the fit of the model which is the true one as stated above:
Asym for group A (fixed ef...