Displaying 6 results from an estimated 6 matches for "divinesaam".
2004 Feb 15
5
Maximum likelihood estimation in R
Dear Sir,
I am a new user of R and I am doing a tast, which is: find the maximum
likelihood estimate of the parameter of Gaussian distribution for generated
100 numbers by using >x=rnorm(100, mean=3, sd=1).
I tried to use following Maximum Likelihood function
>fn<-function(x)
(-50*log((sd(x))^2))-50*log(sqrt(2*pi))-(1/2*((mean(x))^2))*(sum((x-(mean(x))^2)),
but it did not work.
I am
2003 May 21
2
Access Object's Objects HELP
Dear WizaRds,
A run of nls produces the following concise summary:
> summary(cs.wt)
Formula: 0 ~ wt.MM(conc, time, A1, a1, A2, a2)
Parameters:
Estimate Std. Error t value Pr(>|t|)
A1 4.814e+02 2.240e+01 21.495 0.0296 *
a1 7.401e-01 7.435e-02 9.956 0.0637 .
A2 1.613e+02 1.738e+01 9.280 0.0683 .
a2 1.770e-02 7.324e-03 2.417 0.2497
2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues,
Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but
> fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)),
+ data=C1.lsoda,
+ start=list(K1=0.3, k2=0.7),
+ trace=T
+ )
Error in eval(as.name(varName), data) : Object
2004 Jan 30
1
MATLAB to R
Ladies and Gentlemen,
In MATLAB, I can write:
for J=1:M
Y(J+1)=Y(J)+ h * feval(f,T(J),Y(J));
...
In R, I can write above as:
for (J in 2:M)
{
y = y + h * f(t,y)
...
}
----
In MATLAB, I can write:
for J=1:M
k1 = feval(f,T(J),Y(J));
k2 = feval(f,T(J+1),Y(J)+ h * k1
How do I write k2 in R?
k1 = f(t,y)
k2 = ?
Thanks,
/oal
2003 May 22
1
Plot observed vs. fitted values (weighted nls)
Dear WizaRds,
Given the experimental data,
csdata<-data.frame(
time=c(0,1,3,9,20),
conc=c(638.697,395.69,199.00,141.58,112.16)
)
weighted nls is applied,
wt.MM<- function(resp, time,A1,a1,A2,a2)
{
pred <- A1*exp(-a1*time)+A2*exp(-a2*time)
(resp - pred) / sqrt(pred)
}
#
cs.wt <- nls( ~ wt.MM(conc, time,A1,a1,A2,a2), data=csdata,
2003 May 29
0
ODE solvers in R (was:The Wrong Choice: Locked in by license restrict...
Dear Colleague:
I am glad to hear from you. I was going to contact you and ask if you have
notes on the steps involved on how you implemented LSODA. I will gladly take the
project on. In addition to dassl, I want to implement ODESSA also. In other
words, my project is a "suite" of ode solvers for R. The application of these
solvers will be to the study of the distribution of