[R] 'fractal' package

2017-11-16 Thread David Paul
https://rdrr.io/rforge/fractal/

https://cran.r-project.org/web/packages/fractal/fractal.pdf

 

 

Hi,

 

I am trying to learn about nonlinear time series, and fractal time series
analysis in particular.  I am interested in becoming proficient with the
'fractal' package.   I have two specific questions:

 

1. I have a basic understanding of ARMA and ARIMA models.  Can someone
recommend a good introductory text on nonlinear time series that emphasizes
practical application?  I am definitely not looking for a theoretical text
on stochastic process.

 

2. Can someone point me in the direction of case studies where the 'fractal'
package has been used to analyze the stock market?  My main interests are in
the DOW Transportation Index and the S&P500, but in the absence of these
kinds of case studies I will happily study any practical case studies that
utilize the 'fractal' package.

 

 

Many Thanks in Advance,

 

David Paul

 


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] propensity scores & imputation

2017-03-16 Thread David Paul
Hi Mr. Gunter,

Will do.  Thanks, I've not visited stats.stackexchange before.


Kind Regards,

David

-Original Message-
From: Bert Gunter [mailto:bgunter.4...@gmail.com] 
Sent: Thursday, March 16, 2017 7:51 PM
To: david.p...@statmetrics.biz
Cc: R-help 
Subject: Re: [R] propensity scores & imputation

Way out of bounds for this list (see the posting guide). Try posting on 
stats.stackexchange.com instead.

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along and 
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Mar 16, 2017 at 10:42 AM, David Paul  wrote:
> Hi,
>
>
>
> Many thanks in advance for whatever advice / input I may receive.
>
>
>
> I have a propensity score matching / data imputation question.  The 
> purpose of the propensity
>
> score modeling is to put subjects from two different clinical trials 
> on a similar footing so that a key
>
> clinical measurement from one study can be attributed / imputed to the 
> other study.  The goal is
>
> NOT to directly compare the two studies, so this is a very atypical 
> kind of propensity score usage.
>
>
>
> I am using lrm( ) to obtain estimated propensity scores, and my 
> question to this List is rather more
>
> philosophical than R-syntax.
>
>
>
>
>
> Here is the data setup:
>
>
>
>a.frame
> b.frame
>
>---
> 
>
>1. Represents  data from clinical trial A1.
> Represents  data from clinical trial B
>
>   2. Two arms, 'ACTIVE' and 'PLACEBO'  2. Two
> arms, 'ACTIVE' and 'PLACEBO'
>
>3. The active drug is the same as with Study B  3. The active
> drug is the same as with Study A
>
>4. The trial design is very similar to Study B4. The
> trial design is very similar to Study A
>
>5. One measurement is a clinical continuous 5. Does NOT
> have the clinical continuous measure
>
> measure obtained via laboratory assay   that
> is available in Study A
>
>6. Number of randomized subjects = 500   6. Number of
> randomized subjects = 5,000
>
>7. A subset of the baseline covariates (call it 7. A
> subset of the baseline covariates (call it
>
> a.subset.frame) has 100% commonality
> b.subset.frame) has 100% commonality
>
> with b.subset.frame
> with a.subset.frame
>
>
> 8. Primary endpoint is time-to-event
>
>
>
>
>
> Here is the analysis setup:
>
>
>
> I have separately split a.frame and b.frame into 'ACTIVE' and 'PLACEBO'
> subjects.
>
>
>
> For the 'PLACEBO' subjects I have entered the a.subset.frame = 
> b.subset.frame baseline
>
> covariates into lrm( ).  The outcome variable is a factor variable 
> representing Study A = 'Y',
>
> so the estimated propensity scores are the estimated probabilities 
> that a 'PLACEBO' subject is
>
> from Study A.  I then, finally, used the %GREEDY algorithm (posted on 
> Mayo Clinic website)
>
> in SAS to match 1-to-many where the Study A subjects are thought of as 
> 'case' subjects and
>
> the Study B subjects are thought of as 'control' subjects. [I know the 
> matching can be done
>
> in R, I'm working on that now.]  The average number of Study B 
> subjects matched to a
>
> single Study A subject is approximately 5.
>
>
>
> I have done a similar analysis for the 'ACTIVE' subjects.
>
>
>
>
>
>
>
> Here is my question:
>
>
>
> At the end, I will combine the Study B matched 'PLACEBO' and 'ACTIVE'
> subjects and
>
> perform a Cox PH regression to compare 'PLACEBO' and 'ACTIVE' - there 
> will be no Study A
>
> subjects in this analysis.  I want to incorporate the clinical 
> continuous measurement "borrowed"
>
> from Study A as a covariate.  When doing this, how should I best take 
> into account the
>
> 1-to-many matching?  Do I need to weight the Study B subjects, or can 
> I simply enter the
>
> matched Study B subjects into a Cox PH regression and ignore the 
> 1-to-many issue?
>
>
>
>
>
> Kind Regards,
>
>
>
>  David
>
>
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




PGP.sig
Description: PGP signature
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] propensity scores & imputation

2017-03-16 Thread David Paul
Hi,

 

Many thanks in advance for whatever advice / input I may receive.

 

I have a propensity score matching / data imputation question.  The purpose
of the propensity

score modeling is to put subjects from two different clinical trials on a
similar footing so that a key

clinical measurement from one study can be attributed / imputed to the other
study.  The goal is

NOT to directly compare the two studies, so this is a very atypical kind of
propensity score usage.

 

I am using lrm( ) to obtain estimated propensity scores, and my question to
this List is rather more 

philosophical than R-syntax.

 

 

Here is the data setup:

 

   a.frame
b.frame

   ---


   1. Represents  data from clinical trial A1.
Represents  data from clinical trial B

  2. Two arms, 'ACTIVE' and 'PLACEBO'  2. Two
arms, 'ACTIVE' and 'PLACEBO'

   3. The active drug is the same as with Study B  3. The active
drug is the same as with Study A

   4. The trial design is very similar to Study B4. The
trial design is very similar to Study A

   5. One measurement is a clinical continuous 5. Does NOT
have the clinical continuous measure

measure obtained via laboratory assay   that
is available in Study A

   6. Number of randomized subjects = 500   6. Number of
randomized subjects = 5,000

   7. A subset of the baseline covariates (call it 7. A
subset of the baseline covariates (call it

a.subset.frame) has 100% commonality
b.subset.frame) has 100% commonality

with b.subset.frame
with a.subset.frame

 
8. Primary endpoint is time-to-event

 

 

Here is the analysis setup:

 

I have separately split a.frame and b.frame into 'ACTIVE' and 'PLACEBO'
subjects.  

 

For the 'PLACEBO' subjects I have entered the a.subset.frame =
b.subset.frame baseline 

covariates into lrm( ).  The outcome variable is a factor variable
representing Study A = 'Y', 

so the estimated propensity scores are the estimated probabilities that a
'PLACEBO' subject is

from Study A.  I then, finally, used the %GREEDY algorithm (posted on Mayo
Clinic website)

in SAS to match 1-to-many where the Study A subjects are thought of as
'case' subjects and

the Study B subjects are thought of as 'control' subjects. [I know the
matching can be done

in R, I'm working on that now.]  The average number of Study B subjects
matched to a 

single Study A subject is approximately 5.

 

I have done a similar analysis for the 'ACTIVE' subjects.

 

 

 

Here is my question:

 

At the end, I will combine the Study B matched 'PLACEBO' and 'ACTIVE'
subjects and 

perform a Cox PH regression to compare 'PLACEBO' and 'ACTIVE' - there will
be no Study A 

subjects in this analysis.  I want to incorporate the clinical continuous
measurement "borrowed" 

from Study A as a covariate.  When doing this, how should I best take into
account the 

1-to-many matching?  Do I need to weight the Study B subjects, or can I
simply enter the 

matched Study B subjects into a Cox PH regression and ignore the 1-to-many
issue?

 

 

Kind Regards,

 

 David

 



PGP.sig
Description: PGP signature
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] plotting varclus( ) results

2016-09-29 Thread David Paul
Hello,

 

I am running R on a Win7 operating system.  Many thanks in advance for any
help.

 

I am using

 

>library(Hmisc)

>library(rms)

>varclus.out <- varclus(~.,data=temp.df, sim = 'hoeffding')

>plot(varclus.out)

 

to generate a plot suitable for feature space dimension reduction.  Is it
possible

to modify the plot so variable names are color-coded?  For example, half of
the

variable names in red and half in blue.

 

 

Kind Regards,

 

 David Paul

 



PGP.sig
Description: PGP signature
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] obtaining prediction intervals from lrm() in rms library

2014-03-07 Thread David Paul
Hi,

Apologies if this is a silly question -- I am just now learning how to use
some of the basic functions in
the rms library.

I have been using

 foo.dist <- datadist(foo.frame)
 options(datadist='foo.dist')
 lrm.model <- lrm(binary.outcome ~ rcs(contin.var,5)+categ.var, data =
foo.frame, x=TRUE)
 lrm.predict <- predict(lrm.model, type = "fitted")

to obtain the predicted probabilities from a logistic regression model, but
now I need the associated 95%
prediction intervals associated with these predicted probabilities.  I've
read the examples in the ?lrm
help page, and from the information about "predict" from
http://cran.r-project.org/web/packages/rms/rms.pdf
I have tried

 predict(lrm.model, conf.int = 0.95, conf.type = c("individual"))

but I get the error message

 Error in predictrms(object, ..., type = type, se.fit = se.fit) :
conf.type="individual" requires that fit be from ols

>From the same PDF, I have read the "predict.lrm" pages and was not able to
figure out how to get
prediction intervals.



Many thanks in advance for some help,

David

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] transcan() imputation of categorical (factor) variables

2012-05-30 Thread David Paul
Hi, and thanks in advance.

I have used the following to try to obtain singly-imputed values for missing 
data comprising no more than 15%
of any variable in the data:

> library(Hmisc)
> some.df = read.csv("N:/.../some.csv", header = TRUE, stringsAsFactors = TRUE)
> some.trans <- transcan(~ contin.var1 + contin.var2 + categ.var1 + categ.var2,
> categorical =c("categ.var1","categ.var2"),
> transformed = TRUE,
> imputed = TRUE,
> impcat = "score",
> data = some.df,
> iter.max = 100,
> shrink = TRUE,
> method = "canonical"
> )
> attach(some.df,pos=1)
> some.df.imputed <- impute(some.trans)

It seems to run, but the object "some.df.imputed" isn't a dataframe, and R 
issues the message

> Imputed missing values with the following frequencies
> and stored them in variables with their original names:
>
> contin.var1 contin.var2
> 139

which seems to imply that the categorical variables were not imputed.  What I 
want, simply put, is a dataframe
with imputed values for both the continuous and categorical variables.  I'm 
sure I'm doing something silly.
Any help would be greatly appreciated.


Thanks,
David




  

This message contains information which may be confident...{{dropped:11}}

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.