Displaying 2 results from an estimated 2 matches for "scaledcov".
Did you mean:
scaledcoef
2010 Sep 05
0
cov.unscaled in NLS - how to define cov.scaled to make comparable to SAS proc NLIN output - and theoretically WHY are they different
...ces (WHY?)
I convert the cov.unscaled from R's NLS to a correlation and compare it to
SAS's correlation. They are identical;
e.g., cov2cor(summary.nls.L$cov.unscaled)
I have even written a function to convert an NLS object into a "cov.scaled"
element that is equivalent to SAS:
scaledCOV = function (nlsObject)
{
myFactor = nlsObject$cov.unscaled[1,1]/(nlsObject$coefficients[1,2]^2);
myScaled = nlsObject$cov.unscaled/myFactor;
myScaled;
}
so with this function I can determine the factor difference between R and
SAS (which is different with each data run of NLS and NLIN). This f...
2010 Nov 08
1
try (nls stops unexpectedly because of chol2inv error
...nlm ,
fData,
start = initialValues,
control = nls.control(warnOnly = TRUE),
trace=T
)
);
if(class(try.fit) == "try-error")
{
doubleBreak = T;
print(doubleBreak);
break; ## skip to next simulation?
} else {
fit.nls = try.fit;
summary.nls = summary(fit.nls);
summary.nls$cov.scaled = scaledCOV(summary.nls);
pooledDen = pooledDen + dim(fData)[1];
pooledNum = pooledNum + (dim(fData)[1]-1)*summary.nls$cov.scaled;
results = list("data"=fData,"fit.nls"=fit.nls,"summary.nls"=summary.nls);
tData = rbind(tData,fData); ## total data
}
if(j==L)
{
myStr = "nls.L&...