SCM

Forum: open-discussion

Monitor Forum | Start New Thread Start New Thread
Porownania kredytowe [ Reply ]
By: fincasa Magda on 2020-07-04 23:46
[forum:47913]
<p>W internecie można odszukać bez najmniejszego problemu kilka jeżeli nie paręnaście porównywarek finansowych. W rzeczywistości nie ma lepszego wybierania oferty dla nas. Wybieramy kwotę, okres kredytowania i porównywarka finansowa uwidocznia nam kilkanaście ofert. Co więcej, możemy sobie wybrany kredyt zamówić przez kontakt z doradcą.
Wszystko wydaje się łatwe ale...</p>

<p>Często przy składaniu wniosku dostajemy informację, że nie uzyskamy kredytu dlatego że nie spełniamy warunków banku.</p>

<p>Niestety porównywarka kredytowa tylko konfrontuje kredyty, podsuwa który kredyt jest najtańszy, uwidocznia zakamuflowane szczegóły oferty kredytowej, jakich w reklamie danego banku nie można wypatrzyć, natomiast porównywarka kredytowa nie definiuje, że w danym banku kredyt na sto procent uzyskamy.</p>
<p>Każdy bank ma swoją własną politykę, w jednym nasza zdolność finansowa będzie odpowiednia do pozyskania kredytu, w innym natomiast nie.</p>

<p>Jak składać wniosek o kredyt aby obniżyć ewentualność odrzucenia wniosku?
Warto skorzystać z pomocy doradcy kredytowego, zasadniczo w większych porównywarkach kredytowych jest możność skorzystania z pomocy doradcy kredytowego całkiem darmowo.
Porównywarki kredytowe są bardzo praktyczne, warto z nich korzystać wybierając kredyt, należy jednak pamiętać, że to bank postanawia czy udostępni danej osobie kredytu.</p>
https://ecasa.pl/lendico-pozyczka-na-dowod-bez-zaswaidczen-do-50000-zl.html/

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-31 18:45
[forum:39975]
Good questions. Sure. I'll wait for the new thread to answer them so the concepts are more manageable. It's hard for me to follow this 34-post-long thread already.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-31 18:30
[forum:39974]

SAScrossgencode.png (16) downloads
Will,

Thanks.

Do you plan to make a dataset similar to SAS's "TOGETHER" for R so that a cross generational analysis could be done using your r-Forge ACE program? If so, can you foresee writing a "vignette for using cross generational links" in the future? I guess that one would need to know:
(a) how to create a (Gen1 + Gen2) joint .csv file
(b) what to read this into

I'll open a new thread on this topic later. (I still have to discuss with my colleague the soundness of such a cross generational analysis, given our project aims.)

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-31 17:00
[forum:39972]
Good questions. Could you start new posts on either if you're interested?

I'm not sure what you mean about the first question. For the second question, that's possible now with the version on CRAN (1.200). A more complete version of Gen1 was completed last week and will be on CRAN soon.

require(NlsyLinks)
table(Links79Pair$RelationshipPath)

Here's a presentation about using cross generational links.
https://r-forge.r-project.org/forum/forum.php?thread_id=28498&forum_id=4266&group_id=1330

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-29 03:35
[forum:39964]
Will,

Thanks. I'll have to inspect the code some more the day after tomorrow.

In the mean time, I wanted to throw two questions out there:
(1) Would it be possible to incorporate multiple imputations into an analysis (and get pooled ACE results)?
(2) Would it be possible to incorporate the Mother-Child, Aunt-Niece relations into an analysis using siblings and cousins? (I didn't notice any discussion of this in your excellent "Package ‘NlsyLinks" manual, but I imagine that you created the adult-child links for a reason.)

I'm not sure that I would actually do either -- I just want to get a sense of the horizon.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-29 02:00
[forum:39963]
Hi John, if you read Mike Hunter's message he posted (the one four hours before you --It was at 10am central, but I'm not sure what time that would be in your time zone), I think that could clear up some miscommunication. As he said, "I don't think that [bunch variable] would be relevant for your situation. The purpose of the 'Bunch' variable is simply to have a variable to do separate analyses by."

If you type "?cut", then enter, you'll see that the function creates a factor/categorical variable from a quantitative variable. As I acknowledged in the code, it's an artificial example. But I thought it was a safe choice because I knew you already had that variable in you dataset. I didn't want to introduce a new variable that might not be in your data frame.

The reason your code (in your previous message) didn't work is because of this part: `dsOutcomes$Subject1Tag`. There shouldn't be any variable called `Subject1Tag` in the outcomes dataset. The `dsOutcomes` should have one row per *subject* (not one row per *pair*). Therefore dsOutcomes won't have the variable `Subject1Tag` (which refers to the first subject of the pair) or the variable `Subject2Tag` (which refers to the first subject of the pair). It will have just `SubjectTag` (notice there's not a `1` or a `2` in the middle of the variable name).

Here's a trick that I use sometimes: run the `colnames()` function on a data.frame in order to view the names of its variables. There have been three places in this thread where you refer to variables that don't exist in the data frame you're using. The `colnames()` function should increase the troubleshooting efficiency.

Thank you for sticking with things so long. If you'd like to have a phone conversation, please email us a number to call and some times you'd be available. If you have an account with Skype or Google Hangout, it might help to connect that way, so we can see your code during the process. --Will

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-28 19:09
[forum:39961]

Rsplitfile.png (15) downloads
Will,

I'm not getting it -- and I'm sure that others will have trouble with this coding too. Perhaps you could show an example using imported variables (as in your vignette 2). The problem starts with this line:

"dsLinks$Bunch <- cut(dsLinks$Subject1Tag, breaks=bunchCount, labels=paste("Bunch", seq_len(bunchCount)))"

I need to bunch by an imported variable, so I tried changing it to:

"dsOutomes$Bunch <- cut(dsOutcomes$Subject1Tag, breaks=bunchCount, labels=paste("Bunch", seq_len(bunchCount)))"

And numerous variations of this.. But doing so causes all sorts of problems.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Michael Hunter on 2013-10-28 15:09
[forum:39960]
Hi John,

The line

dsLinks$Bunch <- cut(dsLinks$Subject1Tag, breaks=bunchCount, labels=paste("Bunch", seq_len(bunchCount)))

Creates a variable called 'Bunch' in the dsLinks data frame. I could go over the exact nature of this variable, but I don't think that would be relevant for your situation. The purpose of the 'Bunch' variable is simply to have a variable to do separate analyses by.

Later in Will's code the 'Bunch' variable created in that line is used to do separate ACE analyses for each level of the 'Bunch' variable. In your case, I believe 'Bunch' might be the Gender or Sex variable already in your data frame.

Coming at this from the other direction, I think changing your last line to

plyr::ddply(dsOutcomes, .variables="C0005400", .fun=SummarizeC0005400)

will make it run without error.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-28 03:31
[forum:39958]
Hi John, Two things occur to me:
First-- It looks like you need to either (a) rename `C0005400` to `Gender`, or (b) specify "C0005400" in the ddply call instead of "Gender"

(You probably understand the second thing, but I want to double check.)
Second, the last line of your code is passing `dsOutcomes`, which I assume has one row per *subject*. That function needs a linking dataset instead (which has one row per *pair*).

This is a pretty important distinction, and things are a lot easier once the role of the is understood. It looks like your code is a mix between Example 3 and 4 in our "NlsyAce" vignette. See if this helps:
http://cran.r-project.org/web/packages/NlsyLinks/vignettes/NlsyAce.pdf

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-26 18:43
[forum:39955]

Rsplitfiletry1.png (23) downloads
Will,

That's exactly what I am looking for. I'm having trouble implementing the code, though, using my "bunching" variable. One of the problems is that I don't understand the following line:

dsLinks$Bunch <- cut(dsLinks$Subject1Tag, breaks=bunchCount, labels=paste("Bunch", seq_len(bunchCount)))

See my attempt attached.

I confess, though, that I haven't been doing my homework. I'll look at this some more later today and see if I can better figure out what you are doing.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-25 21:59
[forum:39952]

PlaygroundPlyrLavaanBunch.R (9) downloads
Hi John, here are my best responses for now

First: I've attached a complete example; tell me if this is what you intended. It runs a separate ACE for each bunch of people. I used the term 'bunch' so it didn't get confused with the 'groups' that lavaan uses under the covers (ie, R=,25, .5,...). Do you mind if I reference this part of the conversation in the FAQ?

Second: That's a good question. To my knowledge, there's not an easy way to get that from the standard errors outputted from lavaan (see the last line of the code). I believe we'll need to add a few lines to the lavaan model syntax. But this seems like a reasonable capability for the NlsyLinks package to provide, so I'm happy to include it. If you haven't heard from me in a week or two, feel free to remind me.

Third: This may be moot if the plyr approach addressed your need. If I understood your question right, you wanted a subset of the total sample. There are two ways to subset them. That previous example code showed a few approaches to subset the sample. Toggle the comments on and off to reflect the desired way.

Fourth: That's a good question about the weights that we don't have a uniform recommendation for. If you're serious about, will you start a new thread about it?

Did I address everything you asked (except for the standard errors)? -Will

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-25 16:57
[forum:39951]
Will,

Thanks again for the help. I will try the Gen1 function later today.

As for group comparisons, I had two general questions and one specific one pertaining to syntax.

First, can you see an easy way to incorporate the 'plyr' function to 'split' the ACE estimates by subgroups so that one can run an analysis once and generate split ACE estimates, say, as SPSS would.

Second, is there a ways to generate confidence intervals for the ACE estimates?

Third, with regards to syntax, in your 2013-10-13 01:26 reply you suggested the following code:

ace <- AceUnivariate( method="DeFriesFulkerMethod3", dataSet=dsDoubleSubset, oName_1="BirthWeightInOunces_1", oName_2="BirthWeightInOunces_2" )

(refer to: http://r-forge.r-project.org/forum/message.php?msg_id=39891&group_id=1330)

Should that have been....

ace <- AceUnivariate( method="DeFriesFulkerMethod3", dataSet=dsDouble, oName_1="BirthWeightInOunces_1", oName_2="BirthWeightInOunces_2" )

....with "dsSouble" in place of "dsDoubleSubset" in the above line?

My code reads:

rm(list=ls(all=TRUE))
library(NlsyLinks)
filePathOutcomes <-'c:\\Users\\John\\Desktop\\CNLSYALL\\CNLSY10152013.csv'
dsOutcomes <- ReadCsvNlsy79Gen2(filePathOutcomes)
dsOutcomes <- RenameNlsyColumn(dsOutcomes, "C0005400", "Gender")
dsOutcomesSubset <- dsOutcomes
dsOutcomesSubset <- dsOutcomes[dsOutcomes$Gender==1, ]
dsLinks <- Links79Pair
dsLinks <- dsLinks[dsLinks$RelationshipPath=='Gen2Siblings', ]
dsDouble <- CreatePairLinksDoubleEntered(outcomeDataset=dsOutcomesSubset, linksPairDataset=dsLinks, outcomeNames=c("gscore"))
ace <- AceUnivariate( method="DeFriesFulkerMethod3", dataSet=dsDouble, oName_1="gscore_1", oName_2="gscore_2" )
ace

And it seems to work...but I wanted to verify about the "dsDouble" part.

(And somewhat off topic: In your opinion, should the NLSY outcomes be weighted at any point in the process when it comes to biometric estimates?)

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-25 05:41
[forum:39946]
Hi John, I added the function tonight. It won't be on CRAN for a week or so, because there are other changes I'd like to make before another major release. But you can install it by running this code:
install.packages("NlsyLinks", repos="http://R-Forge.R-project.org")

But there's a chance that R-Forge hasn't built it yet. It should show version 1.203 on the build page (https://r-forge.r-project.org/R/?group_id=1330). In that case, it's probably easiest to paste the function below in your code, and keep it there until the new version is on CRAN. Did you have other questions about subgroups? -Will


ReadCsvNlsy79Gen1 <- function( filePath, dsExtract=read.csv(filePath) ) {
if( !("R0000100" %in% colnames(dsExtract)) ) stop("The NLSY variable 'R0000100' should be present, but was not found.")

colnames(dsExtract)[colnames(dsExtract)=='R0000100'] <- "SubjectID"
dsExtract$Generation <- 1
dsExtract$SubjectTag <- CreateSubjectTag(dsExtract$SubjectID, dsExtract$Generation)

dsWithExtended <- SubjectDetails79[SubjectDetails79$Generation==1, c("SubjectTag", "ExtendedID")]
ds <- merge(x=dsExtract, y=dsWithExtended, by="SubjectTag", all.x=TRUE, all.y=FALSE)

firstColumns <- c("SubjectTag", "SubjectID", "ExtendedID", "Generation")
remaining <- setdiff(colnames(ds), firstColumns)
ds <- ds[, c(firstColumns, remaining)]

return( ds )
}

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-24 20:48
[forum:39945]
Hi John, I haven't forgotten about you. We just finished the release version of the Gen1 links last night, and I've been working now on the package. I'm having trouble getting my SVN working with R-Forge.

The package is also hosted on GitHub, but that's probably more trouble than it's worth for you, unless you've built R packages from source before.

If I can't get the SVN working this afternoon, I'll just email you the straight code revised function. You can execute it and it will silently overwrite the package's function of the same name. It will be an adequate work around until my connection issues with SVN are resolved.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-13 17:01
[forum:39901]
Hi,

Yes, I am serious about using Gen1 -- in fact, that's the preferred sample. But if creating the code is too much trouble, I can wait and work on my CNLSY analysis in the meantime. (I'm not in a super hurry and I have a lot to figure out about Links and R and I have other samples to look at and to review and I have to think through some methodological issues) That said, if it isn't much trouble (on both our parts), yes, I would be fine installing something from R-Forge. But waiting a week or 2 isn't a problem either.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-13 16:32
[forum:39900]
We haven't implemented that function for Gen1 yet.

We're about a week or two away from releasing the official links for Gen1. The grant team just had a 1.5 day meeting last weekend to finalize our plans for the release.

Are you serious about using Gen1 now (ie, the original subjects of NLSY79), or were you just experimenting? If it would help you keep momentum this week, I'll create that function for Gen1 and release it on R-Forge (but not on CRAN) in the next day or two.

Would you be comfortable installing something from R-Forge if I gave you instructions how to do it?

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-13 16:02
[forum:39899]

NLSY79R1.png (17) downloads
Will,

I ran into another problem.

I tried to read a NLSY79 .csv file into Links and I got the following message:

> filePathOutcomes <-'c:\\Users\\John\\Desktop\\NLSY79\\AFQTBYSEX.csv'
> dsOutcomes <- ReadCsvNlsy79Gen1(filePathOutcomes)
Error: could not find function "ReadCsvNlsy79Gen1"

Do you have any ideas?

(The .csv file is ok -- for example, I get (ID, SEX, AFQT)):

> colnames(read.csv(filePathOutcomes))
[1] "R0000100" "R0214800" "ZAFQT"

Am I using the wrong ReadCsv command?
Is there a way to list all NLSYLinks commands in R so that I can check if a command is properly typed?

Again, thanks for the help.


RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-13 03:02
[forum:39898]

CNLSYR10.png (18) downloads
"consider opening the file in a text editor (like Notepad or Notepad++)"

It worked!

Thanks so much for the help! And sorry for taking up so much of your time with this. I'll look into the other commands which you noted tomorrow.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-13 02:26
[forum:39897]
I'm sorry this is my fault. I was confusing the order of the snippets until your last screenshot (showing the whole progression) gave me perspective. Thanks for attaching that.

My previous suggestion will never work, because the `ReadCsvNlsy79Gen2` is pulling from the file, not the data frame.

Unless you figure out why SPSS is adding that weird ï.. to the name of the first variable, consider opening the file in a text editor (like Notepad or Notepad++) and manually removing those three characters. That will restore the first variable to what the NLSY intended. It's weird that SPSS did it for the second, but not the first, dataset in your example

If you need a programmatic solution (as opposed to a manual solution), you could write that `dsOutcomes` to a csv (with something like `write.csv(dsOutcomes, row.names=FALSE)`) and then read it into R with `ReadCsvNlsy79Gen2`. I would change the name of the data frame and the file so they don't conflict. Maybe something like `dsOutcomesPass1`, `dsOutcomesPass2`, `filePathOutcomesPass1`, and `filePathOutcomesPass2`.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-13 02:13
[forum:39896]

CNLSYR6.png (19) downloads
That fixed the name but it didn't fix the problem. I attached a screen shot from the beginning.

I also get:

> VerifyColumnExists(dsOutcomes, "C0000100")
[1] 1

...but....

> dsOutcomes <- ReadCsvNlsy79Gen2(filePathOutcomes)
Error in ReadCsvNlsy79Gen2(filePathOutcomes) :
The NLSY variable 'C0000100' should be present, but was not found.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-13 01:51
[forum:39895]
The second line is creating a data.frame that is unrelated to `dsOutcomes` (ie, whose column was renamed in the first line). I think this should work, but I'm having trouble keeping perspective of the whole code when looking at only a few lines of code at a time. Tell me if it doesn't.

dsOutcomes <- read.csv(filePathOutcomes)
colnames(dsOutcomes)[colnames(dsOutcomes)=='ï..C0000100'] <- "C0000100"
summary(dsOutcomes)

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-13 01:44
[forum:39894]
I'd also like to mention that if you prefer to manipulate your outcome variables in SPSS before you can do that, you can. There's nothing critical with `ReadCsvNlsy79Gen2` that you couldn't do with R. But using that function would save you probably 20 minutes of time. The only tricky part to replicate in SPSS would be assigning the ID of the Extended Family (ie, what the NLSY sometimes calls the "HHID") to the right Gen2 subject.In the R console, type `ReadCsvNlsy79Gen2` to see the exact operations of the function.

Or, this might be the easiest way for you: You can still use that function after you've manipulated the dataset in SPSS. Just make sure to (a) export it as a CSV, and (b) have the variables `C0000100` and `C0000200` correspond to the IDs of the Gen2 Subject and his/her mother.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: John Fuerst on 2013-10-13 01:43
[forum:39893]

CNLSYR5.png (16) downloads
No, still not working.

Does the copied and pasted syntax (as seen in the screen shot) look correct?

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-13 01:33
[forum:39892]
There may be some subtle encoding change occruing along the way as the unconventional character (ie, ï) gets copied and pasted through the CSV and forum posts.

Here's a regular expression that should work:
colnames(dsOutcomes)[grep(pattern="^.+C0000100$", x=colnames(dsOutcomes))] <- "C0000100"

If that doesn't work, just cheat and overwrite it by the position. I typically don't like to do this, in case the order of the variables changes. Be careful that it doesn't.
colnames(dsOutcomes)[1] <- "C0000100"

Hope that helps. Please tell us if it doesn't.

RE: Decomposing ACE estimates by subgroups [ Reply ]
By: Will Beasley on 2013-10-13 01:26
[forum:39891]
John, I wanted to address that variable name issue first, so it didn't cause problems downstream. If you feel I'm still misunderstanding you, I apologize and would like ot know more.

Below are two places you can filter out records, based on a variable. In both cases, it occurs after the outcomes dataset is created from a CSV. Notice the first way (called "Filter Method #1") operates on an isolated subject, while the second way (called "Filter Method #2") operates on a pair. The second way gives you options the first way doesn't (like selecting pairs of with different genders). Uncomment whichever suits your purposes best.

Please tell me if the code addresses your original question.
-Will


#####

rm(list=ls(all=TRUE)) #Clear the variables from previous runs.
library(NlsyLinks) #Load the package into the current R session.

### John, Replace these two lines:
filePathGen2 <- file.path(path.package("NlsyLinks"), "extdata", "Gen2Birth.csv") #"F:/Projects/RDev/NlsyLinksStaging/Datasets/Gen2Birth.csv"
dsOutcomes <- ReadCsvNlsy79Gen2(filePathGen2)
#### with these two lines:
# filePathOutcomes <-'c:/Users/John/Desktop/ALLPPVTSCORES/PPVTALLCNLSY3.csv'
# dsOutcomes <- ReadCsvNlsy79Gen2(filePathOutcomes)

dsOutcomes <- RenameNlsyColumn(dsOutcomes, "C0005300", "Race")
dsOutcomes <- RenameNlsyColumn(dsOutcomes, "C0005400", "Gender")
dsOutcomes <- RenameNlsyColumn(dsOutcomes, "C0005700", "Yob")
dsOutcomes <- RenameNlsyColumn(dsOutcomes, "C0328600", "BirthWeightInOunces")

### John, replicate the lines above for your variables like PPVT if it's a straight NLSY variable.
# But it sounds like you've already created a variable with the name you want.
# Notice there are three places below were `BirthWeightInOunces` should be replaced with the name of your PPVT variable

#Filter Method #1
dsOutcomesSubset <- dsOutcomes
#dsOutcomesSubset <- dsOutcomes[dsOutcomes$Gender==1, ]

dsLinks <- Links79Pair
dsLinks <- dsLinks[dsLinks$RelationshipPath=='Gen2Siblings', ] #Use only the Gen2 Siblings (ie, NLSY79-C subjects)
dsDouble <- CreatePairLinksDoubleEntered(outcomeDataset=dsOutcomesSubset, linksPairDataset=dsLinks,
outcomeNames=c("Gender", "BirthWeightInOunces"))
#Filter Method #2
dsDoubleSubset <- dsDouble
# dsDoubleSubset <- dsDouble[(dsDouble$Gender_1==1) & (dsDouble$Gender_2==1), ] #Only males
# dsDoubleSubset <- dsDouble[((dsDouble$Gender_1==1) & (dsDouble$Gender_2==2)) | ((dsDouble$Gender_1==2) & (dsDouble$Gender_2==1)), ] #Only pairs where the siblings are different genders

ace <- AceUnivariate( method="DeFriesFulkerMethod3", dataSet=dsDoubleSubset, oName_1="BirthWeightInOunces_1", oName_2="BirthWeightInOunces_2" )

ace
GetDetails(ace)
summary(GetDetails(ace))

Older Messages
Thanks to:
Vienna University of Economics and Business Powered By FusionForge