Displaying 20 results from an estimated 8000 matches similar to: "creating baseline variable from a longitudinal sequence"
2010 Apr 16
2
managing data and removing lines
Hi,
I am very new to R and I've been trying to work through the R book to gain a
better idea of the code (which is also completely new to me).
Initially I imputed my data from a text file and that seemed to work ok, but
I'm trying to examine linear relationships between gdist and gair, gdist and
gsub, m6dist and m6air, etc.
This didn't work and I think it might have something to do
2006 Oct 15
1
gamma distribution don't allow negative value in GLMs?
Dear friends,
when i use glm() to fit my data, i use
glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, *family
= Gamma(link = inverse),* data =a,))
It shows: error in eval(expr, envir, enclos) : *gamma distribution don't
allow negative value*.
But i use
result<-glm(formula = snail ~ vegtype + mhveg + humidity + elevation +
soiltem, family = poisson, data =a) #this
2011 May 20
1
Factors to Columns
> str(data)
'data.frame': 250 obs. of 3 variables:
$ student: chr "A" "B" "C" "D" ...
$ data : num 20.2 20.4 22.5 22.1 23.3 ...
$ param : Factor w/ 4 levels "AGE","SCHOOL",..: 1 1 1 1 1 1 1 1 1 1
Hi , i would like to split the dataframe so that each level of param is
a column
At the end it should look like
2008 Jul 25
1
Selecting the first measurement only from a longitudinal sequence
Dear R-help mailing list,
I have this problem, I have a joint longitudinal and survival data of the form say
ID Time Failuretime Censoringind longitudinalmeasure
1 0 35 0 123
1 10 35 0 120
1 25 35 1 123
2 0 23 0 100
2 10 23
2010 Sep 07
2
some questions about longitudinal study with baseline
Hi all,
I asked this before the holiday, didn't get any response. So would like to
resend the message, hope to get any fresh attention. Since this is not purely
lme technical question, so I also cc-ed R general mailing list, hope to get some
suggestions from there as well.
I asked some questions on how to analyze longitudinal study with only 2 time
points (baseline and a follow-up)
2010 May 31
1
Creating dropout time from longitudinal data with missing data
Dear R users,
Please assist me with the following problem. I have a dataset that looks like the following:
dat<-data.frame(
'id'=rep(c(1,2,3),each=3),
'time'=rep(c(1,2,3),3),
'y'= c(2,2,NA,2,NA,NA,2,5,7)
)
I wish to create a variable for dropout time in dataframe 'dat' such that the dropout time is the time to drop out by the subject as follows:
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me
ayuden mucho en la web.
Estoy haciendo calculos por grupos con data,table. Tengo un archivo
(zp.res) con tres columnas que clasifican los datos (sol, con, dia) y
una columna de datos numericos (media), de la siguiente forma:
sol con dia media
1: con 0 1 -22.6
2: con 0 1 -36.6
3: con 0 1 -35.6
y
2011 May 09
2
Using NULL to my data?
Dear R users,
I am reading data from a file where there are some missing that are
represented by -9999.00.
I am using the command below.
=====My original data ===========
PARM = TMPC;T12X;T12N;DWPC;PALT;SKNT;DRCT;P24M;CLCL
STN YYMMDD/HHMM TMPC T12X T12N DWPC PALT
SKNT
DRCT P24M CLCL
820420 110429/1200 22.50 -9999.00
2007 Feb 19
1
need help in reading TOMS observed ASCII data file
Hello R Users,
I am new to R.
I have two data sets i) TOMS aerosol optical depth(AOD) and ii) TOMS
ozone(O3).
>
> AOD data is on 1x1 grid and O3 data is on 5x5 grid.
>
> First I want to read AOD and O3 as it is and then I want to regrid AOD on
> 5x5 grid as O3.
>
> Reading is first problem.
>
> FIRST PROBLEM READING AOD:
>
> AOD data is in following format:
>
2008 Dec 21
2
data format issue
Dear all-
I have a dataset (see a sample below - but the whole dataset is June
2005 - June 2008). The "LST" format is "YYMMDDHHmm" and I would like to
get the hourly average of the "mph" for the summer months (spanning all
years). I have been trying to use "aggregate" but am not having much
success at all! any thoughts would be greatly appreciated.
2007 Apr 20
2
sorting data in R
hello,
I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below
thanks
Fertility Agriculture Examination Education Catholic Infant.Mortality
Courtelary 80.2 17.0 15 12 9.96 22.2
Delemont 83.1 45.1 6 9 84.84 22.2
2007 Sep 26
1
Repeated tests against baseline
I came across a post by Karl Knoblick regarding the modeling of longitudinal data (see https://stat.ethz.ch/pipermail/r-help/2007-May/132137.html). I am often asked by physicians to perform what Karl refers to in his post as option 1: to perform paired t-tests against baseline at each follow up time point (30 days, 90 days, 6 months, etc.). Unlike Karl's example, however, many of the trials
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L,
8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon",
"Beer Sheva",
2010 Sep 14
1
NA confusion (length question)
Hi folks,
I am running a very simple regression using
mylm <- lm(mass ~ tarsus, na.action=na.exclude)
I would like the use the residuals from this analysis for more
regression but I'm running into a snag when I try
cbind(mylm$residuals, mydata) # where my data is the original data set
The error tells me that it cannot use cbind because the length of
mylm$residuals is
2010 Jun 02
2
Faster union of polygons?
Dear R-helpers,
thanks for yesterday's speeding-up tip. Here is my next query:
I have lots of polygons (not necessarily convex ones, and they never
have holes) given by x,y coordinates.
I want to get the polygon that is the union of these polygons. This is
my current method, but I am hoping there is a faster method (up to
thousands of polygons, each with ca. 40 xy points).
Example:
2012 Apr 27
2
Deleting observations from baseline that don't appear in follow up
Hello all,
I'm almost embarrassed to post this , it seems so easy. Suppose I have a
baseline and follow up survey but some people are missing in the follow up:
> baseline<-data.frame(id=c(3,5,7,9,12), data= runif(5))
> follow.up<-data.frame(id=c(3,7,9,12), data= runif(4))
> baseline
id data
1 3 0.66771988
2 5 0.28794744
3 7 0.01892821
4 9 0.64863175
5 12 0.86485882
2008 Mar 17
1
Std errors in glm models w/ and w/o intercept
I am doing a reanalysis of results that have previously been published.
My hope was to demonstrate the value of adoption of more modern
regression methods in preference to the traditional approach of
univariate stratification. I have encountered a puzzle regarding
differences between I thought would be two equivalent analyses. Using a
single factor, I compare poisson models with and without
2005 Jun 10
1
Estimate of baseline hazard in survival
Dear All,
I'm having just a little terminology problem, relating the language used in
the Hosmer and Lemeshow text on Applied Survival Analysis to that of the
help that comes with the survival package.
I am trying to back out the values for the baseline hazard, h_o(t_i), for
each event time or observation time.
Now survfit(fit)$surv gives me the value of the survival function,
S(t_i|X_i,B),
2008 Jan 21
3
'matrix' returns integer instead of decimal
R-helpers:
I am experiencing some odd behavior with the 'matrix' function that I have
not experienced before and was wondering if there is something that I was
missing in my code.
---------------------------------
> sessionInfo()
R version 2.6.1 (2007-11-26)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
2011 Jan 18
2
Baseline terms for lrm
Dear R-help and Prof. Harrell:
My question concerns the baseline state for continuous variable in lrm()
within the RMS package.
I have a model which can be reduced to:
lrm(FT ~ rcs(V1, c(0, 1,5))
The model makes perfect sense if the baseline state is where V1>=5 but
the model makes no sense if the baseline category is 0 (which I had
expected).
Can someone point me to a reference, or