Displaying 20 results from an estimated 20000 matches similar to: "A Contrast Question"
2008 Aug 11
3
Peoblem with nls and try
Hello,
I can`t figure out how can increase the velocity of the fitting data by nls.
I have a long data .csv
I want to read evry time the first colunm to the other colunm and analisy with thata tools
setwd("C:/dati")
a<-read.table("Normalizzazione.csv", sep=",", dec=".", header=F)
for (i in 1:dim(a[[2]]]) {
#preparazione dati da analizzare
2017 Oct 22
2
Syntax for fit.contrast
I have a model (run with glm) that has a factor, type. Type has two levels, "general" and "regional". I am trying to get estimates (and SEs) for the model with type="general" and type ="regional" using fit.contrast but I can't get the syntax of the coefficients to use in fit.contrast correct. I hope someone can show me how to use fit.contrast, or some
2017 Oct 22
0
Syntax for fit.contrast
> On Oct 22, 2017, at 6:04 AM, Sorkin, John <jsorkin at som.umaryland.edu> wrote:
>
> I have a model (run with glm) that has a factor, type. Type has two levels, "general" and "regional". I am trying to get estimates (and SEs) for the model with type="general" and type ="regional" using fit.contrast
?fit.contrast
No documentation for
2017 Oct 22
0
Syntax for fit.contrast (from package gmodels)
> On Oct 22, 2017, at 3:56 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote:
>
> David,
> Thank you for responding to my post.
>
> Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"):
> Call:
> glm(formula = events ~ type, family = poisson(link = log), data = data,
> offset =
2017 Oct 22
3
Syntax for fit.contrast (from package gmodels)
David,
Thank you for responding to my post.
Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"):
Call:
glm(formula = events ~ type, family = poisson(link = log), data = data,
offset = log(SS))
Deviance Residuals:
Min 1Q Median 3Q Max
-43.606 -17.295 -4.651 4.204 38.421
Coefficients:
2017 Oct 23
0
Syntax for fit.contrast (from package gmodels)
> On Oct 22, 2017, at 5:01 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote:
>
> David,
> Again you have my thanks!.
> You are correct. What I want is not technically a contrast. What I want is the estimate for "regional" and its SE.
There needs to be a reference value for the contrast. Contrasts are differences. I gave you the choice of two references
2017 Oct 23
2
Syntax for fit.contrast (from package gmodels)
David,
Again you have my thanks!.
You are correct. What I want is not technically a contrast. What I want is the estimate for "regional" and its SE. I don't mind if I get these on the log scale; I can get the anti-log. Can you suggest how I can get the point estimate and its SE for "regional"? The predict function will give the point estimate, but not (to my knowledge)
2017 Oct 23
1
Syntax for fit.contrast (from package gmodels)
David,
predict.glm and se.fit were exactly what I was looking for.
Many thanks!
John
John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax)
2008 Oct 15
1
Parameter estimates from an ANCOVA
Hi all,
This is probably going to come off as unnecessary (and show my ignorance)
but I am trying to understand the parameter estimates I am getting from R
when doing an ANCOVA. Basically, I am accustomed to the estimate for the
categorical variable being equivalent to the respective cell means minus the
grand mean. I know is the case in JMP - all other estimates from these data
match the
2006 Aug 29
0
how to contrast with factorial experiment
Hello, R experts,
If I understand Ted's anwser correctly, then I can not contrast the
mean yields between sections 1-8 and 9-11 under "Trt" but I can
contrast mean yields for sections 1-3 and 6-11 because there exists
significant interaction between two factors (Trt:section4,
Trt:section5). Could I use the commands below to test
the difference between sections 1-3 and 6-11 ?
2010 Sep 29
1
Understanding linear contrasts in Anova using R
#I am trying to understand how R fits models for contrasts in a
#simple one-way anova. This is an example, I am not stupid enough to want
#to simultaneously apply all of these contrasts to real data. With a few
#exceptions, the tests that I would compute by hand (or by other software)
#will give the same t or F statistics. It is the contrast estimates that
R produces
#that I can't seem to
2008 Oct 11
2
R vs SPSS contrasts
Hi Folks,
I'm comparing some output from R with output from SPSS.
The coefficients of the independent variables (which are
all factors, each at 2 levels) are identical.
However, R's Intercept (using default contr.treatment)
differs from SPSS's 'constant'. It seems that the contrasts
were set in SPSS using
/CONTRAST (varname)=Simple(1)
I can get R's Intercept to match
2001 Aug 31
2
contrasts in lm
I've been playing around with contrasts in lm by specifying the contrasts
argument. So, I want to specify a specific contrast to be tested
Say:
> y _ rnorm(100)
> x _ cut(rnorm(100, mean=y, sd=0.25),c(-3,-1.5,0,1.5,3))
> reg _ lm(y ~ x, contrasts=list(x=c(1,0,0,-1)))
> coef(reg)[2]
x1
-1.814101
I was surprised to see that I get a different estimate for the
2006 Oct 06
1
Sum of Bernoullis with varying probabilities
Hi Folks,
Given a series of n independent Bernoulli trials with
outcomes Yi (i=1...n) and Prob[Yi = 1] = Pi, I want
P = Prob[sum(Yi) = r] (r = 0,1,...,n)
I can certainly find a way to do it:
Let p be the vector c(P1,P2,...,Pn).
The cases r=0 and r=n are trivial (and also are exceptions
for the following routine).
For a given value of r in (1:(n-1)),
library(combinat)
Set <- (1:n)
2010 Oct 17
4
Variable name as string
Hello,
from Verzani, simpleR (pdf), p. 80, I created the following function to
test the coefficient of lm() against an arbitrary value.
coeff.test <- function(lm.result, var, coeffname, value) {
# null hypothesis: coeff = value
# alternative hypothesis: coeff != value
es <- resid(lm.result)
coeff <- (coefficients(lm.result))[[coeffname]]
# degrees of freedom = length(var) -
2008 Feb 06
1
ci.pd() (Epi) and Newcombe method
Greetings!
I suspect that there is an error in the code for the
function ci.pd() in the Epi package.
This function is for computing confidence intervals
for a difference of proportions between two independent
groups of 0/1 responses, and implements the Newcombe
("Nc") method and the Agrasti-Caffo "AC" method.
I think there is an error in the computation for the
Newcombe
2004 May 07
1
contrasts in a type III anova
Hello,
I use a type III anova ("car" package) to analyse an unbalanced data design. I
have two factors and I would have the effect of the interaction. I read that
the result could be strongly influenced by the contrasts. I am really not an
expert and I am not sure to understand indeed about what it is...
Consequently, I failed to properly used the fit.contrast function (gregmisc
2002 Jul 18
1
sem: incorrect parameter estimates
Hello.
I am getting results from sem that are not correct (that's assuming
that the results from my AMOS 4.0 software are correct). sem does not
vary some of the parameters substantially from their starting values,
and the final estimates of those parameters as well as the model
chisquare value are incorrect. I've attached some code that
replicates the problem. The parameters in
2007 Sep 21
1
A reproducibility puzzle with NORM
Hi Folks,
I'm using the 'norm' package (based on Shafer's NORM)
on some data. In outline, (X,Y) are bivariate normal,
var(X)=0.29, var(Y)=24.4, cov(X,Y)=-0.277,
there are some 900 cases, and some 170 values of Y
have been set "missing" (NA).
The puzzle is that, repeating the multiple imputation
starting from the same random seed, I get different
answers from the repeats
2006 Aug 21
4
question about 'coef' method and fitted_value calculation
Dear all,
I am trying to calculate the fitted values using a ridge model
(lm.ridge(), MASS library). Since the predict() does not work for lm.ridge
object, I want to get the fitted_value from the coefficients information.
The following are the codes I use:
fit = lm.ridge(myY~myX,lambda=lamb,scales=F,coef=T)
coeff = fit$coef
However, it seems that "coeff" (or "fit$coef") is