Displaying 20 results from an estimated 20000 matches similar to: "Prediction with multiple zeros in the dependent variable"
2009 Sep 08
3
Omnibus test for main effects in the face ofaninteraction containing the main effects.
Daniel,
When Group is entered as a factor, and the factor has two levels, the
ANOVA table gives a p value for each level of the factor. What I am
looking for is the omnibus p value for the factor, i.e. the test that
the factor (with all its levels) improves the prediction of the outcome.
You are correct that normally one could rely on the fact that the model
2010 Sep 10
2
gee p values
windows Vista
R 2.10.1
Is it possible to get p values from gee? Summary(geemodel) does not appear to produce p values.:
> fit4<- gee(y~time, id=Subject, data=data.frame(data))
Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27
running glm to get initial regression estimate
(Intercept) time
1.1215614 0.8504413
> summary(fit4)
GEE: GENERALIZED LINEAR MODELS FOR
2009 May 10
2
plot(survfit(fitCox)) graph shows one line - should show two
R 2.8.1
Windows XP
I am trying to plot the results of a coxph using plot(survfit()). The plot should, I believe, show two lines one for survival in each of two treatment (Drug) groups, however my plot shows only one line. What am I doing wrong?
My code is reproduced below, my figure is attached to this EMail message.
John
> #Create simple survival object
>
2009 Dec 31
4
Obtaining partial output from a function that does not run to completion.
I have written a function that contains runs
lm()
vif() and
glm()
When the glm() blows up with an error message, I don't get the output from either the lm() or vf() even thought neither lm() nor vif() have any problems . How can I force the function to print sequential results rather than wait for the entire function to complete before listing the functhion's output?
Thanks,
John
2009 Dec 30
1
glm error: cannot correct step size
R 2.8.1
windows XP
I am getting an error message that I don't understand when I try to run GLM. The error only occurs when I have all independent variables in the model. When I drop one independent variable, the model runs fine. Can anyone help me understand what the error means and how I can correct it?
Thank you,
John
> fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+jPHI+jMEDICAID+factor(AgeCat)+
2010 Dec 29
6
icon for an R package
I'm looking for an icon to represent an R package. Perhaps something like
http://cdn2.iconfinder.com/data/icons/DarkGlass_Reworked/128x128/apps/package.png
but with the R logo rather than KDE.
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street Web:
2009 May 09
4
how to get design matrix?
How do you get the design matrix R used when calculating ANOVA?
--
View this message in context: http://www.nabble.com/how-to-get-design-matrix--tp23464638p23464638.html
Sent from the R help mailing list archive at Nabble.com.
2011 Jan 12
5
2d plot with modification of plotting symbol to indicate third dimension.
I would like to plot 3-dimensional data on a two-dimensional scatter-plot.
Is there a way I can automatically modify the plot symbol (e.g. changing size or color) to indicate the value of a third variable? E.g. How can I plot weight vs. age and indicate the value of muscle mass for each value weight-age pair by making the plot point proportional to the subject's muscle mass?
Thanks,
John
2007 Jan 18
3
selecting rows for inclusion in lm
I am having trouble selecting rows of a dataframe that will be included
in a regression. I am trying to select those rows for which the variable
Meno equals PRE. I have used the code below:
difffitPre<-lm(data[,"diff"]~data[,"Age"]+data[,"Race"],data=data[data[,"Meno"]=="PRE",])
summary(difffitPre)
The output from the summary indicates that
2011 Oct 28
4
Contrasts with an interaction. How does one specify the dummy variables for the interaction
Forgive my resending this post. To data I have received only one response (thank you Bert Gunter), and I still do not have an answer to my question.
Respectfully,
John
Windows XP
R 2.12.1
contrast package.
I am trying to understand how to create contrasts for a model that contatains an interaction. I can get contrasts to work for a model without interaction, but not after adding the
2010 Feb 01
1
Comparing Variables and Writing a New Column
HI,
I am using Windows XP and R version 2.9.2. I have a data frame written by R
similar to the following:
Lab_ID Analysis_Soil Results -4MAD -2.5MAD
+2.5MAD +4MAD
55003 Calcium-2008-116 900 961 1121.5
1656.5 1817
55003 Calcium-2008-117 3321 2175 2380.5
3065.5 3271
55003
2007 Feb 05
2
Two ways to deal with age in Cox model
I hope one and all will allow a stats question:
When running a cox proportional hazards model ,there are two ways to
deal with age,
including age as a covariate, or to include age as part of the
follow-up time, viz,
Age as a covariate:
tetest1 <- list(time= c(4, 3,1,1,2,2,3),
status=c(1,NA,1,0,1,1,0),
age= c(0, 2,1,1,1,0,0),
2005 Jul 17
1
printing the name of the arguments passed to a function
R2.1.1
Win 2k
I have a function, B, within a function, A.
I would like to have B print the name of the argument passed to it (not
the value of the arguments).
i.e.,
A<-function()
{
B<-function(x,y)
{
fit1<-lm(y~x,data=jo)
print(summary(fit1)
I want B to print the string "age" and the string "height".
}
B(age,height)
}
2010 Jan 02
1
Help with tryCatch
Windows XP
R 2.8.1
Colleagues,
I am trying to run a function testone() and if the function completes without error do one set of instructions, and if the function generates either a warning or an error run another set of instructions. I have read try, and tryCatch help screens at least 20 times, have tried to experiment with code, but I can't understand how to accomplish my desired task.
2010 Aug 04
2
regression analysis with interactions
Hello,
I have got a linear model that looks like this:
lm(criterion ~ variable.A*variable.a + variable.B*variable.b + variable.C *variable.c)
The output computed with stdCoeff() seems to be all right, but it does not show the coefficients of the interaction of the first pair of variables. Instead, it shows "NA":
(Intercept)
NA
2007 Oct 01
4
data structure with coefficients, and call from lm()
Widows XP
R 2.3.1
I have been trying to make a data structure that will contain both the coefficients from a linear regression along with column and row titles AND the call, i.e.
myreg<-lm(y~x+y+z)
whatIwant<-cbind(c(summary(myreg)$call,"",""),summary(myreg)$coefficients)
Neither the statement above, nor any one of twenty variations I have tried work. I would appreciate
2011 Jan 04
5
Page eject and clearing the console
(1) I know that \n when used in cat, e.g. cat("\n") produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page?
(2) I know that control L will clear the console. Is there an equivalent function or other means that can be used in R code to clear the console?
Thanks,
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics
2005 Jul 29
6
Binary outcome with non-absorbing outcome state
I am trying to model data in which subjects are followed through time to
determine if they fall, or do not fall. Some of the subjects fall once,
some fall several times. Follow-up time varies from subject to subject.
I know how to model time to the first fall (e.g. Cox Proportional
Hazards, Kaplan-Meir analyses, etc.) but I am not sure how I can model
the data if I include the data for those
2005 Jul 28
4
CSV file and date. Dates are read as factors!
I am using read.csv to read a CSV file (produced by saving an Excel file
as a CSV file). The columns containing dates are being read as factors.
Because of this, I can not compute follow-up time, i.e.
Followup<-postDate-preDate. I would appreciate any suggestion that would
help me read the dates as dates and thus allow me to calculate follow-up
time.
Thanks
John
John Sorkin M.D., Ph.D.
Chief,
2016 Apr 07
0
using apply to a data frame
??I would like to apply a function, fract, to the columns of a
dataframe. I tried the following
apply(data5NonEventEpochs,2,fract)
but, no surprise it did not work as apply works on matrices not data
frames. How can I apply a fuction to the columns of a data frame? (I
can't covert data5NonEventsEpochs to a matrix as it contains character
data).
Thank you,
John
John David Sorkin M.D., Ph.D.