y.org/wp-content/uploads/2013/04/9.-Sparks.pdf
<http://spatialdemography.org/wp-content/uploads/2013/04/9.-Sparks.pdf>
look at page 134 of that pdf.
Hope this helps
-
Corey Sparks, PhD
Assistant Professor
Department of Demography
University of Texas at San Antonio
501 West César E. C
Dear list,
I am fitting a logistic multi-level regression model and need to test the
difference between the ordinary logistic regression from a glm() fit and the
mixed effects fit from glmer(), basically I want to do a likelihood ratio test
between the two fits.
The data are like this:
My outc
variables)
names(dat.a)%in%names(dat.b)
Could anyone help with this problem, I would basically like to form a
subset of the dat.a that matches the variable names in dat.b. If
there were only a few variables, this would be easier, but I have
between 4 and 5 thousand variables in each datase
3 most used packages:
1)spdep (for spatial regression/statistics)
2)car
3)survival (which is recommended, so)
3.5) survey (for analysis of complex survey samples)
Best to all,
Corey
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas
ial, subset=group==1)
fit.2<-glm(y~x1+x2, data=yourdat, family=binomial, subset=group==2)
where group is your grouping variable.
Which should give you that kind of stratified model.
Hope this helps,
Corey
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization S
the sp library to display your variable.
Corey
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa
ase
other attached packages:
[1] survey_3.19
loaded via a namespace (and not attached):
[1] tools_2.10.1
And have the same error on a linux server.
Thanks,
Corey
--
Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Du
Fair enough.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa.edu
https://rowdyspace.utsa.edu/us
if you do:
fit<-survfit (Surv(DTDMRS3, DMRS3) ~ RS2540477)
fit$surv
will have the survival function, and
fit$time
will have the failure times, these should give you what you want
Hope this helps
Corey
-----
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organizat
asking?
With regard to the t-statistics generated from lmer/glmer, you can get
p-values by using dt(), or look at your confidence intervals for the
parameters.
Does this help?
Corey
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas
Whoops, sorry that's pt(), not dt()
Thanks Dennis!
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at'
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa.edu
https://rowdyspace.utsa.edu/users/ozd504/www/index.htm
--
There is a screeplot() function that takes the output from prcomp. It plots
the value of the eigenvalue vs. the eigenvalue's number.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Mon
Hi Paulo,
if your data are distance matrices, you might consider doing a Mantel test,
look at the mantel() function in package vegan. While this is not
technically measuring spatial autocorrelation, it will test for correlation
between the attribute distances and the geographic distances. Also,
: (subscript) logical subscript too long
If anyone has experience with a multivariate Poisson response vector I would
gladly appreciate any suggestions.
Corey Sparks
--
Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 We
Hi, it appears that your corrdinates contain commas, instead of decimal
points, R sees the commas and immediatly thinks the data are text, you
should replace the commas with decimal points in a text editor.
Corey
gedasg wrote:
>
> hello, I have strange error.
>
> > gyliai<-read.table(file.cho
Yes, R thinks the coordinates are characters, that needs to change. Also,
alternatively you could use the write .dbf function in the foreign()
library, ArcGis likes dbf files (just no long names)
Corey
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization
1","Angelina County","48","005"],
["23158","Aransas County","48","007"],
["9054","Archer County","48","009"],
["1901","Armstrong County","48","011"
nty
258458 Anderson County48001
314786 Andrews County48003
486771 Angelina County48005
523158 Aransas County48007
6 9054Archer County48009
7 1901 Armstrong County48011
-
Corey Sparks, PhD
Assistant Professor
Depa
Did you try tapply?
?tapply
tapply(RT, RT$R, fun=WA)
or something like that
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
I think the hardest thing about true EDMA (meaning the Richtsmeier and Lele
version) is the bootstrapping to get significance. Have you tried their
software?
http://www.getahead.psu.edu/resource_new.html
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization
the variable you want to analyze (first argument to tapply) and the
variable you want to analyze by (the factor, second arg to tapply)
both must have the same number of rows, that' s how I read this.
CS
Corey Sparks
Assistant Professor
Department of Demography and Organization St
I agree, i've seen procrustes in R, but not EDMA, R has natural
support for bootstrapping via the boot() library, i'm sure others
would be grateful if you wanted to write some functions..
CS
Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
College
the binomial regression model
summary(fit)
will print the coefficients and model fit
In the future could you please read the posting guide and put in a data
example or some R code you have tried.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
I'd start with the nnet library
type:
?nnet
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at'
check out the coxme and the kinship packages, both have the capability to fit
the Cox proportional hazard model in a multi-level setting, or you could use
glmer in lme4 to fit discrete-time (logistic) models with random intercepts.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of
you can use prop.tables() on a table() object to get %ages, does this do what
you need?
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458
Can you provide an example of your code?
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa
/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] R2WinBUGS_2.1-16 coda_0.14-2 lattice_0.19-13 rbugs_0.4-9
loaded via a namespace (and not attached):
[1] grid_2.12.1 tools_2.12.1
Thanks,
Corey
Corey Sparks
Assistan
Hello list,
Ive been trying to get OpenBUGS running on my mac using the wine emulator. I
can run Openbugs just fine by doing:
wine ~/OpenBUGS312/OpenBUGS.exe
In the terminal, so OpenBUGS works. When I try to run the schools example
using rbugs(), the OpenBUGS process starts in wine, but it ju
Solved it:
oldest<-unlist(tapply(warmerge$birth.year, warmerge$SibID,function(x)
ifelse (x==min(x, na.rm=T)|is.na(x)==T,1,0)))
-----
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monte
your notwork nodes.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa.edu
https://rowdyspace.utsa.e
ning messages:
>1: In log(dlist$dtrans(Y[exactsurv, 1])) : NaNs produced
>2: In log(y) : NaNs produced
then you have negative durations in the data. I would suggest truncating your
data at y>0, as that would avoid taking natural logs of negative numbers.
Corey Sparks
Corey S.
the community level
variable with 4 levels.
Does anyone know if there is a way to get the standard error for the
random effect, like in nofit1$var? I would like to know if my random
effect is worth writing home about.
Any help would be most appreciated
Corey Sparks
I can get the following output
nof
the community level
variable with 4 levels.
Does anyone know if there is a way to get the standard error for the
random effect, like in nofit1$var? I would like to know if my random
effect is worth writing home about.
Any help would be most appreciated
Corey Sparks
I can get the following output
nof
Did you try read.xls() in the xlsReadWrite library, I have had good success
with this.
Corey
Corey S. Sparks, Ph.D.
Assistant Professor
Department of Demography and Organization Studies
University of Texas San Antonio
One UTSA Circle
San Antonio, TX 78249
email:[EMAIL PROTECTED]
[[a
?
Thanks for any insight.
Best,
Corey
Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
One UTSA Circle
San Antonio, TX 78249
210 458 6858
corey.spa...@utsa.edu
__
R-help@r-project.org mailing
d.
My problem is I need to check if either of two patterns match in the
data, an example that doesn't work is
gregexpr(c("\\at", "\\og"), text)
which is the basic form of what I'm looking to do, if this would work
I would get a match for elements 1 through 5 of
Xing Yuan wrote:
> Dear List,
>
> Does anybody no how to compare mean survival times for two (more) groups in
> R? What test statistics should I use?
You should be careful considering the mean survival time, because censoring in
survival data often makes the mean less informative. The median sur
e error:
Error in tapply(popdat, dat2.sub$Country, pres.test, ... = list(N0 =
popdat[, :
arguments must have same length
I see that the function mapply will take multiple arguements, but I
don't think it will use an INDEX like tapply.
Any comments or clarification would be most appreci
I am trying to read a SAS dataset into R that is in a .SD2 format, which
is the Version 6 standard format from SAS.
I see the routines that read the SAS XPORT format (foreign, Hmisc), but
is there any way to read this one?
Any help would be greatly appreciated.
Corey Sparks
Corey Sparks
Assistant
41 matches
Mail list logo