Displaying 20 results from an estimated 10000 matches similar to: "2 questions on matrix manipulation in R"
2006 Feb 16
2
how to retrieve robust se in coxph
Hi,
I am using coxph in simulations and I want to store the "robust se" (or
"se2" in frailty models) for each replicate. Is there a function to retrieve
it, like vcov() for the variance estimate? Thanks!
Lei Liu
Assistant Professor
Division of Biostatistics and Epidemiology
Dept. of Public Health Sciences
School of Medicine
University of Virginia
3181 Hospital West
2008 Nov 10
1
question about contrast in R for multi-factor linear regression models?
Hi all,
I am using "lm" to fit some anova factor models with interactions.
The default setting for my unordered factors is "treatment". I
understand the resultant "lm" coefficients for one factors, but when
it comes to the interaction term, I got confused.
> options()$contrasts
unordered ordered
"contr.treatment"
2006 Jun 29
2
help with coxme
Hi there,
I have a question on fitting data by coxme. In particular I want to fit a
random intercept and random slope cox model. Using the rats dataset as an
example, I generated another covariate x2 and want to specify a random slope
for x2. Here is my code:
x2=matrix(rep(runif(50), 3), 50, 3)
x2=as.vector(t(x2))
rats2=cbind(rats, x2)
But when I used the coxme function as follows, it gave
2011 Oct 09
2
pdIdent in smoothing regression model
Hi there,
I am reading the 2004 paper "Smoothing with mixed model software" in
Journal of Statistical Software, by Ngo and Wand. I tried to run
their first example in Section 2.1 using R but I had some problems.
Here is the code:
library(nlme)
fossil <- read.table("fossil.dat",header=T)
x <- fossil$age
y <- 100000*fossil$strontium.ratio
knots <-
2011 Jul 30
1
How to install "adapt" package
Hi there,
I want to install the "adapt" package, which is available at
http://cran.r-project.org/src/contrib/Archive/adapt/. This package
cannot be directly installed by "install packages" menu in R. So I
downloaded the zip file into the hard drive. But I couldn't install
it using "install packages from local zip files". I also tried to
unzip these files in
2004 Nov 19
2
function 'vcov' for coxph in R 2.0.0
Hi there,
After I fitted a cox model, I used vcov to obtain the
variance of the parameter estimate. It worked correctly in
R 1.9.1. But it failed in R 2.0.0 and the error message is
Error in vcov(cox.1) : no applicable method for "vcov"
I don't know if it is a bug or there is some update on
this function. Thanks!
Lei Liu
Assistant Professor
Division of Biostatistics and
2010 Aug 23
5
trajectory plot (growth curve)
Hi there,
I want to make trajectory plots for data as follows:
ID time y
1 1 1.4
1 2 2.0
1 3 2.5
2 1.5 2.3
2 4 4.5
2 5.5 1.6
2 6 2.0
...
That is, I will plot a growth curve for each subject ID, with y in
the y axis, and time in the x axis. I would like to have all growth
curves in the same plot. Is there
2006 Aug 22
1
a generic Adaptive Gauss Quadrature function in R?
Hi there,
I am using SAS Proc NLMIXED to maximize a likelihood with
multivariate normal random effects. An example is the two part random
effects model for repeated measures semi-continous data with a
cluster at 0. I use the "model y ~ general(loglike)" statement in
Proc NLMIXED, so I can specify a general log likelihood function
constructed by SAS programming statements. Then the
2009 Oct 29
3
Removing & generating data by category
Dear R users,
Basically, from the following arbitrary data set:
a <-
data.frame(id=c(c("A1","A2","A3","A4","A5"),c("A3","A2","A3","A4","A5")),loc=c("B1","B2","B3","B4","B5"),clm=c(rep(("General"),6),rep("Life",4)))
> a
2005 Mar 19
2
simple problem, but not for me
Hello, I'm new in R and I want to do one thing that is very easy in excel, however, I cant do it in R.
Suppose we have the data frame:
data<- data.frame(A=c("a1","a2","a3","a4","a5"))
I need to obtain another column in the same data frame (lets say B=c(b1,b2,b3,b4,b5) in the following way:
b1=a1/(a1+a2+a3+a4+a5)
2008 Mar 25
2
Compare two data sets
I would like to compare two data sets saved as text files (example below) to determine if both sets are identical(or if dat2 is missing information that is included in dat1) and if they are not identical list what information is different between the two sets(ie output "a1", "a3" as the differing information). The overall purpose would be to remove "a1" and
2010 Sep 27
2
subtraction based on two groups in a dataframe
Hello
I have a data set like below:
plate.id well.id Group HYB rlt1
1 P1 A1 Control SKOV3hyb 0.190
2 P1 A2 Control SKOV3hyb 0.210
3 P1 A3 Control SKOV3hyb 0.205
4 P1 A4 Control SKOV3hyb 0.206
5 P1 A5 Control SKOV3hyb 0.184
385 P1 A1 ovca SKOV3hyb 0.184
386 P1 A2 ovca SKOV3hyb 0.229
387
2008 Feb 10
2
reshape
Dear colleagues,
I'd like to reshape a datafame in a long format to a wide format, but
I do not quite get what I want. Here is an example of the data I've
have (dat):
sp <- c("a", "a", "a", "a", "b", "b", "b", "c", "d", "d", "d", "d")
tr <- c("A",
2013 Feb 07
1
Merging data in arrays
Dear All,
Here is a hypothetical sample (sorry for the clumsy code):
A1 <- matrix(1:5, nrow=5, ncol=1)
A2 <- matrix(6:10, nrow=5, ncol=1)
A3 <- matrix(11:15, nrow=5, ncol=1)
A4 <- matrix(16:20, nrow=5, ncol=1)
A5 <- matrix(21:25, nrow=5, ncol=1)
A6 <- matrix(26:30, nrow=5, ncol=1)
B1 <- matrix(c(A1, A2, A3), nrow=5, ncol=3)
B2 <- matrix(c(A2, A3, A4), nrow=5, ncol=3)
B3
2003 Dec 17
1
TODO hardlink reporting problem - fixed?
On Mon, 15 Dec 2003, jw schultz <jw@pegasys.ws> wrote:
> OK, first pass on TODO complete.
....
This hardlink bug report is nearly 21 months old... So I took a look
at it using 2.5.7. See below.
> BUGS ---------------------------------------------------------------
>
> Fix hardlink reporting 2002/03/25
> (was: There seems
2012 Sep 08
2
How to Rename Column Labels?
Hi,
How do I rename the column labels in the table?
For Instance, if I have a table like this, and I want to have the column labels changed from "A1 A2 A3 A4 A5" to "Mike Kate Michelle Paul Young"
A1 A2 A3 A4 A5
1 33 44 55 66 77
2
3
4
5
6
7
7
8
9
and my text file location is: ""/Users/MAC/Desktop/data.txt"
When I type in
2008 Aug 05
2
Create data frame from header only
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20080804/8b871b75/attachment.pl>
2005 Aug 15
2
queer data set
I have a dataset that is basically structureless. Its dimension varies
from row to row and sep(s) are a mixture of tab and semi colon (;) and
example is
HEADER1 HEADER2 HEADER3 HEADER3
A1 B1 C1 X11;X12;X13
A2 B2 C2 X21;X22;X23;X24;X25
A3 B3 C3
A4 B4 C4 X41;X42;X43
A5 B5 C5 X51
etc., say. Note that a blank
2010 Mar 20
2
EM algorithm in R
Please help me in writing the R code for this problem. I've been solving this
for 4 days. It was hard for me to solve it. It's a simulation problem in R.
The problem is
My true model is a normal mixture which is given as
0.5 N(-0.8,1) + 0.5 N(0.8,1). This model has two components.
I will get a random sample of size 100 from this model. I will do this 300
times.
That means, I will have
2017 Aug 25
2
retrieve machine password in current Samba?
We have a wireless network that uses 802.1x authentication, in which domain joined computers use their machine credentials to connect.
Windows machines do this automatically, and until recently Linux computers could join using wicd, wpa-supplicant, and a simple script that would retrieve the machine password with tdbdump.
( specifically tdbdump -k SECRETS/MACHINE_PASSWORD/DOMAIN