Displaying 20 results from an estimated 1000 matches similar to: "predict ordered regresssion"
2011 Jan 20
2
splitting a square symmetric matrix
So many matrices are square symmetrical (i.e. variance-covariance matrices),
is there any way to get R to split the matrix on its diagonal and just
return one diagonal?
So if I have
mat<-matrix(c(1,4,3,4,1,2,3,2,1), nrow = 3, ncol=3, byrow=TRUE)
is there anyway to get the lower right diagonal instead of the entire
symmetric matrix?
-------------------------------------------
2011 Jan 31
2
Rubin's rules of multiple imputation
Hello all, if I have multiple imputed data sets, is there a command or
function in R in any package you know of to combine those, I know one common
MI approach is rubins rules, is there a way to do this using his rules or
others? I know theres ways, like using Amelia from Gary King's website to
create the imputed data sets, but how to make them into one or combine them
for analysis.
2011 Mar 10
0
confidence intervals when using polr()
Hello, I am running a model with four categories and want predicted
probabilities in each category. Now for this example I wont give a
counterfactual just the training data is fine but is there anyway to get a
confidence interval around the predicted probabilities in each group? I have
tried but it gives me probabilities and I have used interval="confidence",
level=.095 and then interval
2011 Jan 19
2
VarCorr
I have a loop that I would like to use to extract the "stddev" for
each itteration so I can average the "stddev" for all the runs. It
would be helpful to know how to extract the "stddev" for each run from
the VarCorr. Thanks
MCruns<-1000
sighatlvec<-rep(NA,MCruns)
sighatbvec<-rep(NA,MCruns)
sighatevec<-rep(NA,MCruns)
for(mc in 1:MCruns)
{
2011 Jan 31
3
List of all times zones in R
Hi all, in R I have?Sys.timezone() function to get the current working
Time zone. However I want to have a vector to get the list of all
available time zones, like say, LETTERS gives me all letters. Is there
any function like that?
Thanks in advance,
2008 Aug 27
2
r function for calculating extreme spread in group
I'm trying to figure out how to write a r function that will calculate
the extreme spread of a group of points given their (x,y)
coordinates. Extreme Spread is the maximal Euclidean distance between
two points in a group
ex.spread = max{ sqrt [ (xi-xj)^2 - (yi-yj)^2 ] } for i not equal to j
I have 60 levels to apply this to.
There is the combination function in the dprep package but
2009 Jun 05
2
p-values from VGAM function vglm
Anyone know how to get p-values for the t-values from the coefficients
produced in vglm?
Attached is the code and output ? see comment added to output to show
where I need p-values
+ print(paste("********** Using VGAM function gamma2 **********"))
+ modl2<-
vglm(MidPoint~Count,gamma2,data=modl.subset,trace=TRUE,crit="c")
+ print(coef(modl2,matrix=TRUE))
2010 Oct 08
5
saving object function
Ok so if I have a function:
functest<-function(x){
a<-x+1
b<-x+2
c<-x+3
paste(a)
paste(b)
paste(c)
}
Now I know I can do cat(), or return() on one of them but if I was to run
the function with any number, how could I create objects to save so I could
do, I am wondering if I have more than one object within my function.
functest$a
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a
question which has been perplexing me. I have been working on doing a
Bayesian calculating inserting studies sequentially after using a
non-informative prior to get a meta-analysis type result. I created a
function using three iterations of this, my code is below. I insert prior
mean and precision (I add precision manually
2010 Oct 06
1
selected value in a vector to make bold
I wasn't sure about the subject so I am sorry about the vagueness, but if I
have a vector of values, how do I get a certain type of vectors to be bold
or italics?
So let x be a vector from -10 to 10, how would I tell it to bold the x
values that are greater than 0? Or like absolute value of 5? Is it possible
to do this in like an if else statement? Could I use
x<-seq(-10,10,1)
2010 Jun 13
1
using latticeExtra plotting confidence intervals
I am wanting to plot a 95% confidence band using segplot, yet I am wanting
to have groups. For example if I have males and females, and then I have
them in different races, I want the racial groups in different panels. I
have this minor code, completely made up but gets at what I am wanting, 4
random samples and 4 samples of confidence, I know how to get A & B into one
panel and C&D in to
2010 Jul 09
2
split with list
Dear List I would like to ask you something concenting a better print of the R output:
I have a bit data frame which has the following structure:
CFISCALE RAGSOCB ANNO VAR1 VAR2.........
9853312 astra 2005 6 45
9853312 astra 2006 78 45
2009 Feb 14
2
anova help
Hi all, I am trying to run a two factor anova, but one of the factors is a
random factor, now I am also running in SPSS and it seems its dividing by
the wrong term to get the appropriate F term. here is my data. In SPSS the F
scores about double the ones in R, how can I specify one of my factors as a
random factor or change it to where it does the right model fitting? I am
using the lm command
2009 Oct 30
4
opacity under dispersion command under plotrix
Is there anyway to make the lines in the dispersion command come forward in
a plot and allow the fill in the dispersion parameter be transparent so all
of the lines I am using to note confidence intervals are shown?
-------------------------------------------
Joe King, M.A.
Ph.D. Student
University of Washington - Seattle
206-913-2912
jp@joepking.com
2009 Nov 27
2
layers in xYplot of Hmisc
In the "filled bands" part of xYplot of the Hmisc package, is there a way to
have multiple bands with multiple lines? or does it just allow one for now?
So I had an example bit ago had a made up line and CI, now if I wanted to
make a second line with a CI filled in can I put them on the same plot?
x<-seq(1,10,1)
y<-seq(1,10,1)
ci<-y*.10
ciupper<-y+ci
2009 Dec 15
2
subtitle in Hmisc xYplot
Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have some
dummy code of
x<-seq(1,10,1)
y<-rev(seq(1,10,1))
ci<-y*.10
ciupper<-y+ci
cilower<-y-ci
this code works fine:
xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points = TRUE,
method='filled bands', main='main title')
but when I add sub=. at the end and use this
2009 Jun 16
0
Generation from COX PH with gamma frailty
Hello,
I want to generate data set from Cox PH model with gamma frailty effects.
theta(parameter for frailty distribution)=2
beta=1.5
n=300
cluster size=30
number of clusters=10
I think I should first generate u from Gamma(Theta,theta) and then using
this theta I could not decide how I should generate the survival times?
Is there any package for this? or any document you could suggest?
Any
2003 Dec 19
3
partial transfer
I am attempting to use rsync to backup a Win98 laptop to a FreeBSD 4.8
backup server. I have experienced the same problem at roughly the same
point in the process on two occations. The laptop contains ~2.7Gb of data.
On the first attempt we received this error at 2.3Gb and on the second at
2.4Gb.
rsync error: partial transfer (code 23) at main.c(575)
Would love to have a full backup of the
2003 Dec 30
2
Shorten long lines in man page options summary
One thing that's bugged me is that some of the man page lines in the
options summary are longer than 79 chars and wrap onto the next line.
These are just one line summaries (detailed description appear later)
so they can, and should, be terse.
Here's an edited diff showing my proposed changes (and a 79 char ruler):
2009 Dec 21
3
Signif. codes
My question is about the "Signif. codes" and the p-value, specifically, the
output when I run
summary(nameofregression.lm)
So you get this little key:
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
And on a regression I ran, next to the intercept data, I get '***'
Coefficients:
>
> Estimate Std. Error t value Pr(>|t|)
>
>